btrev43083 adds 8 changesets to branch 'master' old head: 17ba980278fc30125216491bbbbc86e53bebed2a new head: 54883b1bb5334cdb6a77a77e33e634c699c02353 overview: http://cgit.haiku-os.org/buildtools/log/?qt=range&q=54883b1+%5E17ba980 ---------------------------------------------------------------------------- 43f1e2d: * Add .gitignore. cb83cf1: Adjust configuration for gcc/libgcc. * Gcc will now build libgcc.a, libgcc_eh.a and libgcc_s.so. * Activate thread support for libgcc. * Let libgcc use ELF dwarf2 unwinding on Haiku. * Activate ELF symbol versioning on Haiku. * Activate use of __cxa_atexit * Drop fragments of Haiku support for mipsel 7579cd6: Set missing executable flag on libgcc/configure. cece7c2: Fix configuration of libstdc++. * The configure script for libstdc++ contained a couple of duplicate 'haiku*' case entries, where the first would shadow the second. * Correct several incorrect libtool definitions and paths. 9f6654f: Use crtbeginS.o and crtendS.o for everything. * The glue code files crtbegin.o and crtend.o don't cleanup globals properly, only the variants with the S suffix do. As executables are shared on Haiku, we use crtbeginS.o and crtendS.o for those, too. This fixes crashes on shutdown of Haiku servers that load add-ons (e.g. Print Server and Media Add-On Server). affbe90: Apply shared-library-related fixes to libtool.m4, too. ec31cc6: Explicitly link libgcc and cleanup search paths. * Adjust the libgcc spec to actually link against libgcc explicitly (it is no longer included in libroot.so on anything except x86_gcc2). * Apply --as-needed when linking against libgcc_s.so * Drop search paths that no longer exist (/boot/common/...). 54883b1: Let gcc2 use crtbeginS.o and crtendS.o, too. * I doubt that this makes much of a difference, but it avoids yet another indirection in Haiku's build system. [ Oliver Tappe <zooey@xxxxxxxxxxxxxxx> ] ---------------------------------------------------------------------------- 10 files changed, 77 insertions(+), 76 deletions(-) .gitignore | 3 +++ gcc/gcc/config.gcc | 25 +++++++++++++++++-------- gcc/gcc/config/haiku.h | 27 +++++++++++---------------- gcc/libgcc/config.host | 30 +++++++++++++----------------- gcc/libgcc/config/t-haiku | 3 +++ gcc/libgcc/configure | 0 gcc/libstdc++-v3/configure | 32 +++++++++++++++----------------- gcc/libtool.m4 | 27 ++++++++++++--------------- legacy/gcc/gcc/config/i386/haiku.h | 4 ++-- legacy/gcc/gcc/configure | 2 +- ############################################################################ Commit: 43f1e2dba3df5fce92d45ff0c96a35b6da29b9e7 URL: http://cgit.haiku-os.org/buildtools/commit/?id=43f1e2d Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Mon Jul 21 09:18:25 2014 UTC * Add .gitignore. ---------------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b585521 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +autom4te.cache +jam/bin.* +jam/jam0 ############################################################################ Commit: cb83cf1ca3f762d9c5a0f89b0b9e99111bf2c51c URL: http://cgit.haiku-os.org/buildtools/commit/?id=cb83cf1 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Fri Jul 18 09:59:51 2014 UTC Adjust configuration for gcc/libgcc. * Gcc will now build libgcc.a, libgcc_eh.a and libgcc_s.so. * Activate thread support for libgcc. * Let libgcc use ELF dwarf2 unwinding on Haiku. * Activate ELF symbol versioning on Haiku. * Activate use of __cxa_atexit * Drop fragments of Haiku support for mipsel ---------------------------------------------------------------------------- diff --git a/gcc/gcc/config.gcc b/gcc/gcc/config.gcc index 55e8bf9..8002129 100644 --- a/gcc/gcc/config.gcc +++ b/gcc/gcc/config.gcc @@ -625,6 +625,19 @@ case ${target} in # need_64bit_hwint=yes # system compiler has this for all arch! use_gcc_stdint=wrap ;; +*-*-haiku*) + # This is the generic ELF configuration of Haiku. Later + # machine-specific sections may refine and add to this + # configuration. + # + gas=yes + gnu_ld=yes + tmake_file="t-slibgcc" + case ${enable_threads} in + "" | yes | posix) thread_file='posix' ;; + esac + default_use_cxa_atexit=yes + ;; *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu) extra_options="$extra_options gnu-user.opt" gas=yes @@ -1239,11 +1252,11 @@ x86_64-*-freebsd*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" ;; i[34567]86-*-haiku*) - tmake_file='t-haiku i386/t-crtpic' + tmake_file="${tmake_file} t-haiku i386/t-crtpic" tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h haiku.h i386/haiku.h haiku-stdint.h" ;; x86_64-*-haiku*) - tmake_file='t-haiku i386/t-haiku64' + tmake_file="${tmake_file} t-haiku i386/t-haiku64" tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h haiku.h i386/haiku64.h haiku-stdint.h" ;; i[34567]86-*-netbsdelf*) @@ -1749,7 +1762,7 @@ m68k-*-rtems*) m68k-*-haiku*) default_m68k_cpu=68020 default_cf_cpu=5206 - tmake_file="m68k/t-m68kbare m68k/t-crtstuff t-haiku" #?? + tmake_file="${tmake_file} m68k/t-m68kbare m68k/t-crtstuff t-haiku" #?? tm_file="${tm_file} dbxelf.h elfos.h haiku.h m68k/haiku.h" tm_defines="${tm_defines} MOTOROLA=1" ;; @@ -1954,10 +1967,6 @@ mips-*-elf* | mipsel-*-elf*) tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h" tmake_file="mips/t-elf" ;; -mipsel-*-haiku*) - tmake_file='mips/t-elf t-haiku' - tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h" - ;; mips64-*-elf* | mips64el-*-elf*) tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h" tmake_file="mips/t-elf" @@ -2100,7 +2109,7 @@ powerpc-*-eabi*) use_gcc_stdint=wrap ;; powerpc-*-haiku*) - tmake_file="rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm t-haiku" + tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm t-haiku" tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h haiku.h rs6000/haiku.h" extra_options="${extra_options} rs6000/sysv4.opt" ;; diff --git a/gcc/libgcc/config.host b/gcc/libgcc/config.host index 1596263..d394074 100644 --- a/gcc/libgcc/config.host +++ b/gcc/libgcc/config.host @@ -195,6 +195,14 @@ case ${host} in ;; esac ;; +*-*-haiku*) + # This is the generic ELF configuration of Haiku. Later + # machine-specific sections may refine and add to this + # configuration. + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-haiku t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" + tmake_file="$tmake_file t-slibgcc-nolc-override" + extra_parts="crtbegin.o crtend.o" + ;; *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu) tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux" extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o" @@ -324,7 +332,7 @@ arm*-*-netbsdelf*) ;; arm-*-haiku*) tmake_file="${tmake_file} arm/t-arm arm/t-elf arm/t-bpabi" - tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" + tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" tm_file="${tm_file} arm/bpabi-lib.h" unwind_header=config/arm/unwind-arm.h extra_parts="crtbegin.o crtend.o" @@ -515,11 +523,10 @@ x86_64-*-freebsd*) tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff" ;; i[34567]86-*-haiku*) - tmake_file="${tmake_file} i386/t-crtstuff t-libgcc-pic" - extra_parts="crtbegin.o crtend.o" + tmake_file="${tmake_file} i386/t-crtstuff i386/t-eh-dw2" ;; x86_64-*-haiku*) - tmake_file="${tmake_file} i386/t-crtstuff t-libgcc-pic" + tmake_file="${tmake_file} i386/t-crtstuff i386/t-eh-dw2" extra_parts="crtbegin.o crtend.o" ;; i[34567]86-*-netbsdelf*) @@ -750,9 +757,6 @@ mips*-*-linux*) # Linux MIPS, either endian. tmake_file="${tmake_file} mips/t-tpbit" fi ;; -mips*-*-haiku*) - extra_parts="crtbegin.o crtend.o" - ;; mips*-sde-elf*) tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16" case "${with_newlib}" in diff --git a/gcc/libgcc/config/t-haiku b/gcc/libgcc/config/t-haiku new file mode 100644 index 0000000..b4fff2d --- /dev/null +++ b/gcc/libgcc/config/t-haiku @@ -0,0 +1,3 @@ +# Use unwind-dw2-fde +LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ + $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c ############################################################################ Commit: 7579cd67985b493c4eb65b86e12fc0a753413217 URL: http://cgit.haiku-os.org/buildtools/commit/?id=7579cd6 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Fri Jul 18 10:10:51 2014 UTC Set missing executable flag on libgcc/configure. ---------------------------------------------------------------------------- diff --git a/gcc/libgcc/configure b/gcc/libgcc/configure old mode 100644 new mode 100755 ############################################################################ Commit: cece7c2f4b5be8726b4ef805b807c5b36f75d155 URL: http://cgit.haiku-os.org/buildtools/commit/?id=cece7c2 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Fri Jul 18 10:12:10 2014 UTC Fix configuration of libstdc++. * The configure script for libstdc++ contained a couple of duplicate 'haiku*' case entries, where the first would shadow the second. * Correct several incorrect libtool definitions and paths. ---------------------------------------------------------------------------- diff --git a/gcc/libstdc++-v3/configure b/gcc/libstdc++-v3/configure index dd7bf5c..fff6d59 100755 --- a/gcc/libstdc++-v3/configure +++ b/gcc/libstdc++-v3/configure @@ -6227,7 +6227,7 @@ aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; -beos* | haiku*) +beos*) lt_cv_deplibs_check_method=pass_all ;; @@ -8563,7 +8563,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } esac ;; - beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; @@ -8583,8 +8583,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } haiku*) # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= ;; hpux*) @@ -9253,8 +9251,8 @@ _LT_EOF ;; haiku*) - allow_undefined_flag=unsupported - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes ;; interix[3-9]*) @@ -10547,7 +10545,7 @@ amigaos*) esac ;; -beos* | haiku*) +beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH @@ -10705,8 +10703,9 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no ;; hpux9* | hpux10* | hpux11*) @@ -12577,8 +12576,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; haiku*) - allow_undefined_flag_CXX=unsupported - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes ;; hpux9*) @@ -13445,7 +13444,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; esac ;; - beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) @@ -13466,8 +13465,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; haiku*) # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. @@ -14232,7 +14229,7 @@ amigaos*) esac ;; -beos* | haiku*) +beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH @@ -14388,8 +14385,9 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no ;; hpux9* | hpux10* | hpux11*) ############################################################################ Commit: 9f6654f4a86ec123bb690190714db3e949fa80bb URL: http://cgit.haiku-os.org/buildtools/commit/?id=9f6654f Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Mon Jul 21 11:16:18 2014 UTC Use crtbeginS.o and crtendS.o for everything. * The glue code files crtbegin.o and crtend.o don't cleanup globals properly, only the variants with the S suffix do. As executables are shared on Haiku, we use crtbeginS.o and crtendS.o for those, too. This fixes crashes on shutdown of Haiku servers that load add-ons (e.g. Print Server and Media Add-On Server). ---------------------------------------------------------------------------- diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h index 258e154..9dcda0e 100644 --- a/gcc/gcc/config/haiku.h +++ b/gcc/gcc/config/haiku.h @@ -63,10 +63,10 @@ Boston, MA 02111-1307, USA. */ #undef STARTFILE_SPEC -#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s" +#define STARTFILE_SPEC "crti.o%s crtbeginS.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s" #undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtend.o%s crtn.o%s" +#define ENDFILE_SPEC "crtendS.o%s crtn.o%s" /* Every program on Haiku links against libroot which contains the pthread routines, so there's no need to explicitly call out when doing threaded diff --git a/gcc/libgcc/config.host b/gcc/libgcc/config.host index d394074..cda47a1 100644 --- a/gcc/libgcc/config.host +++ b/gcc/libgcc/config.host @@ -96,7 +96,7 @@ arm*-*-*) ;; avr-*-*) cpu_type=avr - ;; + ;; bfin*-*) cpu_type=bfin ;; @@ -201,7 +201,7 @@ case ${host} in # configuration. tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-haiku t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver" tmake_file="$tmake_file t-slibgcc-nolc-override" - extra_parts="crtbegin.o crtend.o" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" ;; *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu) tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux" @@ -335,7 +335,6 @@ arm-*-haiku*) tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" tm_file="${tm_file} arm/bpabi-lib.h" unwind_header=config/arm/unwind-arm.h - extra_parts="crtbegin.o crtend.o" ;; arm*-*-linux*) # ARM GNU/Linux with ELF tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix" @@ -527,7 +526,6 @@ i[34567]86-*-haiku*) ;; x86_64-*-haiku*) tmake_file="${tmake_file} i386/t-crtstuff i386/t-eh-dw2" - extra_parts="crtbegin.o crtend.o" ;; i[34567]86-*-netbsdelf*) ;; @@ -686,7 +684,7 @@ lm32-*-rtems*) lm32-*-uclinux*) extra_parts="$extra_parts crtbegin.o crtendS.o crtbeginT.o" tmake_file="lm32/t-lm32 lm32/t-uclinux t-libgcc-pic t-softfp-sfdf t-softfp" - ;; + ;; m32r-*-elf*) tmake_file=t-fdpbit ;; @@ -703,9 +701,6 @@ m32r-*-linux*) m32rle-*-linux*) tmake_file="$tmake_file m32r/t-linux t-fdpbit" ;; -m68k-*-haiku*) - extra_parts="crtbegin.o crtend.o" - ;; m68k-*-elf* | fido-*-elf) tmake_file="$tmake_file m68k/t-floatlib" ;; @@ -859,9 +854,6 @@ powerpc*-*-freebsd*) ;; esac ;; -powerpc-*-haiku*) - extra_parts="crtbegin.o crtend.o" - ;; powerpc-*-netbsd*) tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff" ;; ############################################################################ Commit: affbe90c4cdaa78bec5e37c4ab25c6c8c2e32600 URL: http://cgit.haiku-os.org/buildtools/commit/?id=affbe90 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Mon Jul 21 13:04:11 2014 UTC Apply shared-library-related fixes to libtool.m4, too. ---------------------------------------------------------------------------- diff --git a/gcc/libtool.m4 b/gcc/libtool.m4 index 5038c84..daf6268 100644 --- a/gcc/libtool.m4 +++ b/gcc/libtool.m4 @@ -1137,7 +1137,7 @@ fi # Invoke $ECHO with all args, space-separated. func_echo_all () { - $ECHO "$*" + $ECHO "$*" } case "$ECHO" in @@ -2184,7 +2184,7 @@ amigaos*) esac ;; -beos* | haiku*) +beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH @@ -2342,8 +2342,9 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes + sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' + hardcode_into_libs=no ;; hpux9* | hpux10* | hpux11*) @@ -2991,7 +2992,7 @@ aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; -beos* | haiku*) +beos*) lt_cv_deplibs_check_method=pass_all ;; @@ -3603,7 +3604,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) @@ -3625,8 +3626,6 @@ m4_if([$1], [CXX], [ ;; haiku*) # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. @@ -3915,7 +3914,7 @@ m4_if([$1], [CXX], [ esac ;; - beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; @@ -3936,8 +3935,6 @@ m4_if([$1], [CXX], [ haiku*) # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) @@ -4429,8 +4426,8 @@ _LT_EOF ;; haiku*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) @@ -5785,8 +5782,8 @@ if test "$_lt_caught_CXX_error" != yes; then ;; haiku*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) ############################################################################ Commit: ec31cc6bfcc5cd3f93208fbf2c667074a19c9ba4 URL: http://cgit.haiku-os.org/buildtools/commit/?id=ec31cc6 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Tue Jul 22 14:03:46 2014 UTC Explicitly link libgcc and cleanup search paths. * Adjust the libgcc spec to actually link against libgcc explicitly (it is no longer included in libroot.so on anything except x86_gcc2). * Apply --as-needed when linking against libgcc_s.so * Drop search paths that no longer exist (/boot/common/...). ---------------------------------------------------------------------------- diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h index 9dcda0e..0331d2d 100644 --- a/gcc/gcc/config/haiku.h +++ b/gcc/gcc/config/haiku.h @@ -55,12 +55,10 @@ Boston, MA 02111-1307, USA. */ #undef LIB_SPEC #define LIB_SPEC "-lroot" -/* gcc runtime lib is built into libroot.so on Haiku */ -/* ??? This is gonna be lovely when the next release of gcc has - some new symbol in, so that links start failing. */ -#undef LIBGCC_SPEC -#define LIBGCC_SPEC "" - +/* Use --as-needed -lgcc_s for eh support. */ +#ifdef HAVE_LD_AS_NEEDED +#define USE_LD_AS_NEEDED 1 +#endif #undef STARTFILE_SPEC #define STARTFILE_SPEC "crti.o%s crtbeginS.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s" @@ -181,9 +179,9 @@ Boston, MA 02111-1307, USA. */ cause nasty problems if we override it. */ #define LIBRARY_PATH_ENV "BELIBRARIES" -/* With STANDARD_STARTFILE_PREFIX_{1,2} set to "/boot/common/develop/lib/" - and "/boot/system/develop/lib/", MD_STARTFILE_PREFIX adds the last one of the - standard paths. The user specific paths are set via LIBRARY_PATH_ENV. */ +/* Set STANDARD_STARTFILE_PREFIX_1 set to "/boot/system/develop/lib/", or the + respective secondary architecture path. The user specific paths are set via + LIBRARY_PATH_ENV. */ #undef STANDARD_STARTFILE_PREFIX_1 #undef STANDARD_STARTFILE_PREFIX_2 #undef MD_STARTFILE_PREFIX @@ -191,15 +189,12 @@ Boston, MA 02111-1307, USA. */ #ifdef HYBRID_SECONDARY /* For a secondary compiler on a hybrid system, use alternative search paths.*/ #define STANDARD_STARTFILE_PREFIX_1 \ - "/boot/common/develop/lib/" HYBRID_SECONDARY "/" + "/boot/system/non-packaged/develop/lib/" HYBRID_SECONDARY "/" #define STANDARD_STARTFILE_PREFIX_2 \ "/boot/system/develop/lib/" HYBRID_SECONDARY "/" -#define MD_STARTFILE_PREFIX \ - "/boot/common/non-packaged/develop/lib/" HYBRID_SECONDARY "/" #else /* HYBRID_SECONDARY */ -#define STANDARD_STARTFILE_PREFIX_1 "/boot/common/develop/lib/" +#define STANDARD_STARTFILE_PREFIX_1 "/boot/system/non-packaged/develop/lib/" #define STANDARD_STARTFILE_PREFIX_2 "/boot/system/develop/lib/" -#define MD_STARTFILE_PREFIX "/boot/common/non-packaged/develop/lib/" #endif /* HYBRID_SECONDARY */ /* Haiku doesn't have a separate math library. */ ############################################################################ Revision: btrev43083 Commit: 54883b1bb5334cdb6a77a77e33e634c699c02353 URL: http://cgit.haiku-os.org/buildtools/commit/?id=54883b1 Author: Oliver Tappe <zooey@xxxxxxxxxxxxxxx> Date: Tue Jul 22 14:09:39 2014 UTC Let gcc2 use crtbeginS.o and crtendS.o, too. * I doubt that this makes much of a difference, but it avoids yet another indirection in Haiku's build system. ---------------------------------------------------------------------------- diff --git a/legacy/gcc/gcc/config/i386/haiku.h b/legacy/gcc/gcc/config/i386/haiku.h index d2d4d59..0f83b7c 100644 --- a/legacy/gcc/gcc/config/i386/haiku.h +++ b/legacy/gcc/gcc/config/i386/haiku.h @@ -199,10 +199,10 @@ Boston, MA 02111-1307, USA. */ #define LIBGCC_SPEC "" #undef STARTFILE_SPEC -#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!nostart: %{!shared: start_dyn.o%s}} init_term_dyn.o%s" +#define STARTFILE_SPEC "crti.o%s crtbeginS.o%s %{!nostart: %{!shared: start_dyn.o%s}} init_term_dyn.o%s" #undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtend.o%s crtn.o%s" +#define ENDFILE_SPEC "crtendS.o%s crtn.o%s" /* Get perform_* macros to build libgcc.a. */ #include "i386/perform.h" diff --git a/legacy/gcc/gcc/configure b/legacy/gcc/gcc/configure index 6d4bfac..da6fd1c 100755 --- a/legacy/gcc/gcc/configure +++ b/legacy/gcc/gcc/configure @@ -3588,7 +3588,7 @@ for machine in $build $host $target; do tm_file=i386/haiku.h xmake_file=i386/x-haiku extra_objs=winnt.o - extra_parts='crtbegin.o crtend.o' + extra_parts='crtbegin.o crtbeginS.o crtend.o crtendS.o' fixincludes=Makefile.in float_format=i386 ;;