Add defines required for shared libgcc, crtbegin, and crtend

parent 3b241ccb
......@@ -3089,7 +3089,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
gcc_dir=`${PWD_COMMAND}` ; \
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
cd $(build_objdir)/fixincludes && \
$(SHELL) -c true "$${gcc_dir}/$${fix_dir}" \
$(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
$(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
rm -f $${fix_dir}/syslimits.h; \
if [ -f $${fix_dir}/limits.h ]; then \
......
......@@ -809,6 +809,12 @@ case ${target} in
gas=yes
gnu_ld=yes
default_use_cxa_atexit=yes
tmake_file="${tmake_file} t-slibgcc"
case ${enable_threads} in
yes)
thread_file='posix'
;;
esac
case ${target} in
i[34567]86-*-redox* | x86_64-*-redox*)
xm_file=i386/xm-redox.h
......
......@@ -8,10 +8,10 @@
#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!shared: %{!static: %{rdynamic:-export-dynamic}}}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
#define STARTFILE_SPEC "%{!shared:crt0.o%s} crti.o%s %{shared:crtbeginS.o%s;:crtbegin.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#define ENDFILE_SPEC "%{shared:crtendS.o%s;:crtend.o%s} crtn.o%s"
#undef NO_IMPLICIT_EXTERN_C
#define NO_IMPLICIT_EXTERN_C 1
......
......@@ -664,16 +664,19 @@ x86_64-*-kfreebsd*-gnu)
tm_file="${tm_file} i386/elf-lib.h"
;;
i[34567]86-*-redox*)
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
extra_parts="$extra_parts crtbegin.o crtbeginS.o crtend.o crtendS.o crti.o crtn.o"
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
tmake_file="$tmake_file t-slibgcc t-glibgcc-gld t-slibgcc-elf-ver"
;;
x86_64-*-redox*)
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
extra_parts="$extra_parts crtbegin.o crtbeginS.o crtend.o crtendS.o crti.o crtn.o"
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
tmake_file="$tmake_file t-slibgcc t-glibgcc-gld t-slibgcc-elf-ver"
;;
aarch64-*-redox*)
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
extra_parts="$extra_parts crtbegin.o crtbeginS.o crtend.o crtendS.o crti.o crtn.o"
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic"
tmake_file="$tmake_file t-slibgcc t-glibgcc-gld t-slibgcc-elf-ver"
md_unwind_header=aarch64/aarch64-unwind.h
;;
i[34567]86-pc-msdosdjgpp*)
......
......@@ -199,6 +199,7 @@ case "${host}" in
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
;;
*-mingw32*)
GLIBCXX_CHECK_LINKER_FEATURES
......
......@@ -31,7 +31,7 @@
using std::new_handler;
using std::bad_alloc;
#if 0
#if !_GLIBCXX_HAVE_ALIGNED_ALLOC
#if _GLIBCXX_HAVE__ALIGNED_MALLOC
#define aligned_alloc(al,sz) _aligned_malloc(sz,al)
#elif _GLIBCXX_HAVE_POSIX_MEMALIGN
......
......@@ -2581,6 +2581,16 @@ rdos*)
dynamic_linker=no
;;
redox*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
hardcode_into_libs=yes
;;
solaris*)
version_type=linux
need_lib_prefix=no
......@@ -3127,6 +3137,10 @@ rdos*)
lt_cv_deplibs_check_method=pass_all
;;
redox*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment