Created attachment 175751 [details] Connect new libgcc_eh and libgcc_s to the build The attached patch disables gnu/lib/libgcc and uses lib/libgcc_eh, lib/libgcc_s (using compiler-rt and LLVM libunwind) when MK_LLVM_LIBUNWIND is set.
Does MK_LLVM_LIBUNWIND have to be changed for the exp-run ?
> Does MK_LLVM_LIBUNWIND have to be changed for the exp-run ? It defaults to yes for i386 and amd64 (since r303394). Also, note that the existing patch won't apply to svn HEAD due to some refactoring. I'll attach a new patch that can be used if you're starting from a more recent version.
Created attachment 176085 [details] LLVM libunwind + compiler_rt patch, rebased on r307822
I am asking this question because something looks strange, with the patch applied I have this: % ar -t usr/lib/libgcc_eh.a unwind-c.o gthr-gnat.o unwind-sjlj.o unwind-dw2.o unwind-dw2-fde-glibc.o those files seem to come from libgcc While without the patch I have: % ar -t usr/lib/libgcc_eh.a UnwindLevel1-gcc-ext.o Unwind-sjlj.o Unwind-EHABI.o gcc_personality_v0.o UnwindLevel1.o int_util.o libunwind.o UnwindRegistersSave.o UnwindRegistersRestore.o those files seem to come from libunwind
Hmm. Indeed, with the patch gthr-gnat.o etc. should not be used. Oh, oops. This was a mistake in the first patch that should be addressed in the rebased one - the change in gnu/lib/Makefile (to disconnect gnu/lib/libgcc) was missing in the first one, sorry about that.
With the patch applied, there is no more /lib/libgcc_s.so.1 , it moved to /usr/lib/libgcc_s.so.1
(In reply to Antoine Brodin from comment #6) Thanks, install location fixed in r307864
Exp-run results on i386: http://package18.nyi.freebsd.org/build.html?mastername=headi386PR213480-default&build=2016-10-24_06h21m43s New failures: + {"origin"=>"audio/linuxsampler", "pkgname"=>"linuxsampler-1.0.0_5", "phase"=>"stage", "errortype"=>"coredump"} + {"origin"=>"benchmarks/super-smack", "pkgname"=>"super-smack-1.3_2", "phase"=>"package", "errortype"=>"???"} + {"origin"=>"databases/firebird25-client", "pkgname"=>"firebird25-client-2.5.6_1", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"devel/dprog", "pkgname"=>"dprog-0.3.1_2", "phase"=>"package", "errortype"=>"compiler_error"} + {"origin"=>"devel/ebnf2yacc", "pkgname"=>"ebnf2yacc-0.1.1", "phase"=>"package", "errortype"=>"compiler_error"} + {"origin"=>"devel/efl", "pkgname"=>"efl-1.18.1", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"devel/libsigcx", "pkgname"=>"libsigcx-0.6.6_8", "phase"=>"configure", "errortype"=>"configure_error"} + {"origin"=>"devel/mico", "pkgname"=>"mico-2.3.13_2", "phase"=>"build", "errortype"=>"bad_C++_code"} + {"origin"=>"devel/monotone-viz", "pkgname"=>"monotone-viz-1.0.2_7", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"devel/vera++", "pkgname"=>"vera++-1.3.0", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"editors/abiword-docs", "pkgname"=>"abiword-docs-3.0.1", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"editors/libreoffice4", "pkgname"=>"libreoffice4-4.3.7_8", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"graphics/ayam", "pkgname"=>"ayam-1.23", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"graphics/bugle", "pkgname"=>"bugle-0.0.20100508_2", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"graphics/pixie", "pkgname"=>"pixie-2.2.6_12", "phase"=>"package", "errortype"=>"coredump"} + {"origin"=>"graphics/synfigstudio", "pkgname"=>"synfigstudio-1.0.2", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"graphics/variety", "pkgname"=>"variety-0.5.4_2", "phase"=>"stage", "errortype"=>"???"} + {"origin"=>"java/classpath", "pkgname"=>"classpath-0.99_1", "phase"=>"configure", "errortype"=>"configure_error"} + {"origin"=>"java/openjdk6", "pkgname"=>"openjdk6-b40,1", "phase"=>"build", "errortype"=>"clang"} + {"origin"=>"java/openjdk6-jre", "pkgname"=>"openjdk6-jre-b40,1", "phase"=>"build", "errortype"=>"clang"} + {"origin"=>"java/openjdk7", "pkgname"=>"openjdk-7.111.01,1", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"java/openjdk7-jre", "pkgname"=>"openjdk-jre-7.111.01,1", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"lang/polyml", "pkgname"=>"polyml-5.6", "phase"=>"build", "errortype"=>"termios"} + {"origin"=>"lang/rust", "pkgname"=>"rust-1.12.1", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"math/hfst", "pkgname"=>"hfst-3.8.2", "phase"=>"build", "errortype"=>"makefile"} + {"origin"=>"net-im/licq", "pkgname"=>"licq-base-1.8.2_2", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"net-p2p/amule", "pkgname"=>"amule-2.3.2", "phase"=>"configure", "errortype"=>"configure_error"} + {"origin"=>"net-p2p/amule-devel", "pkgname"=>"amule-devel-10966_1", "phase"=>"configure", "errortype"=>"configure_error"} + {"origin"=>"science/orthanc", "pkgname"=>"orthanc-1.1.0", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"sysutils/catfish", "pkgname"=>"catfish-1.4.1", "phase"=>"configure", "errortype"=>"???"} + {"origin"=>"textproc/grap", "pkgname"=>"grap-1.45", "phase"=>"stage", "errortype"=>"install_error"} + {"origin"=>"textproc/kenlm", "pkgname"=>"kenlm-20140830", "phase"=>"build/runaway", "errortype"=>"runaway_process"} + {"origin"=>"textproc/libkolabxml", "pkgname"=>"libkolabxml-1.1.6", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"textproc/xalan-c", "pkgname"=>"xalan-c-1.11", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"www/g-cows", "pkgname"=>"g-cows-1.12", "phase"=>"package", "errortype"=>"???"} + {"origin"=>"x11-fm/worker", "pkgname"=>"worker-3.8.4", "phase"=>"package", "errortype"=>"???"} Around 850 new ports skipped due to new failures Failure logs: http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/linuxsampler-1.0.0_5.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/super-smack-1.3_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/firebird25-client-2.5.6_1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/dprog-0.3.1_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/ebnf2yacc-0.1.1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/efl-1.18.1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/libsigcx-0.6.6_8.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/mico-2.3.13_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/monotone-viz-1.0.2_7.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/vera++-1.3.0.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/abiword-docs-3.0.1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/libreoffice4-4.3.7_8.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/ayam-1.23.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/bugle-0.0.20100508_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/pixie-2.2.6_12.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/synfigstudio-1.0.2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/variety-0.5.4_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/classpath-0.99_1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/openjdk6-b40,1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/openjdk6-jre-b40,1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/openjdk-7.111.01,1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/openjdk-jre-7.111.01,1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/polyml-5.6.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/rust-1.12.1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/hfst-3.8.2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/licq-base-1.8.2_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/amule-2.3.2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/amule-devel-10966_1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/orthanc-1.1.0.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/catfish-1.4.1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/grap-1.45.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/kenlm-20140830.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/libkolabxml-1.1.6.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/xalan-c-1.11.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/g-cows-1.12.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-24_06h21m43s/logs/errors/worker-3.8.4.log
Exp-run results on amd64: http://package18.nyi.freebsd.org/build.html?mastername=headamd64PR213480-default&build=2016-10-25_14h41m10s New failures on amd64: + {"origin"=>"java/classpath", "pkgname"=>"classpath-0.99_1", "phase"=>"configure", "errortype"=>"configure_error"} + {"origin"=>"java/openjdk6", "pkgname"=>"openjdk6-b40_1,1", "phase"=>"build", "errortype"=>"clang"} + {"origin"=>"java/openjdk6-jre", "pkgname"=>"openjdk6-jre-b40_1,1", "phase"=>"build", "errortype"=>"clang"} + {"origin"=>"java/openjdk7", "pkgname"=>"openjdk-7.111.01_1,1", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"java/openjdk7-jre", "pkgname"=>"openjdk-jre-7.111.01_1,1", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"lang/rust", "pkgname"=>"rust-1.12.1", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"lang/rust-nightly", "pkgname"=>"rust-nightly-1.12.0.20160717", "phase"=>"build", "errortype"=>"???"} Around 600 new ports skipped due to those failures Failure logs: http://package18.nyi.freebsd.org/data/headamd64PR213480-default/2016-10-25_14h41m10s/logs/errors/classpath-0.99_1.log http://package18.nyi.freebsd.org/data/headamd64PR213480-default/2016-10-25_14h41m10s/logs/errors/openjdk6-b40_1,1.log http://package18.nyi.freebsd.org/data/headamd64PR213480-default/2016-10-25_14h41m10s/logs/errors/openjdk6-jre-b40_1,1.log http://package18.nyi.freebsd.org/data/headamd64PR213480-default/2016-10-25_14h41m10s/logs/errors/openjdk-7.111.01_1,1.log http://package18.nyi.freebsd.org/data/headamd64PR213480-default/2016-10-25_14h41m10s/logs/errors/openjdk-jre-7.111.01_1,1.log http://package18.nyi.freebsd.org/data/headamd64PR213480-default/2016-10-25_14h41m10s/logs/errors/rust-1.12.1.log http://package18.nyi.freebsd.org/data/headamd64PR213480-default/2016-10-25_14h41m10s/logs/errors/rust-nightly-1.12.0.20160717.log
I believe r308001 should address it.
Back trace from i386 firebird25-client core file: (lldb) bt * thread #1: tid = 101675, 0x28ac4e63 libc.so.7`thr_kill + 7, name = 'create_db', stop reason = signal SIGABRT * frame #0: 0x28ac4e63 libc.so.7`thr_kill + 7 frame #1: 0x28ac4e48 libc.so.7`__raise(s=<unavailable>) + 72 at raise.c:52 [opt] frame #2: 0x28ac4d83 libc.so.7`abort + 99 at abort.c:65 [opt] frame #3: 0x285d2f57 libcxxrt.so.1`std::terminate() + 135 at exception.cc:1472 [opt] frame #4: 0x285d38dd libcxxrt.so.1`report_failure(err=101675, thrown_exception=0xfbffca40) + 77 at exception.cc:719 [opt] frame #5: 0x285d33e7 libcxxrt.so.1`::__cxa_throw(void *, std::type_info *, void (*)(void *)) [inlined] throw_exception(__cxxabiv1::__cxa_exception*) + 183 at exception.cc:778 [opt] frame #6: 0x285d33c0 libcxxrt.so.1`::__cxa_throw(thrown_exception=0x2900c044, tinfo=0x08455380, dest=(create_db`Firebird::Exception::~Exception()))(void *)) + 144 at exception.cc:801 [opt] frame #7: 0x0805c07d create_db`Firebird::system_call_failed::raise(char const*) + 125 frame #8: 0x08056225 create_db`Firebird::SignalSafeSemaphore::enter() + 69 frame #9: 0x08081448 create_db`(anonymous namespace)::shutdownThread(void*) + 200 frame #10: 0x081cf065 create_db`(anonymous namespace)::threadStart(void*) + 69 frame #11: 0x284a8f6c libthr.so.3`thread_start(curthread=<unavailable>) + 364 at thr_create.c:289 [opt]
It looks like I get the same i386 unhandled exception abort without the patch.
(In reply to Ed Maste from comment #12) Although the abort backtrace is the same, there is a difference in behaviour: Without patch: ./work/Firebird-2.5.6.27020-0/gen/firebird/bin/create_db out operating system directive semaphore.h: enter: sem_wait() failed Abort trap (core dumped) With patch: # work/Firebird-2.5.6.27020-0/gen/firebird/bin/create_db out Abort trap (core dumped)
Exp-run results on i386: http://package18.nyi.freebsd.org/build.html?mastername=headi386PR213480-default&build=2016-10-27_20h07m00s New failures on i386: + {"origin"=>"audio/linuxsampler", "pkgname"=>"linuxsampler-1.0.0_5", "phase"=>"stage", "errortype"=>"coredump"} + {"origin"=>"databases/firebird25-client", "pkgname"=>"firebird25-client-2.5.6_1", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"devel/efl", "pkgname"=>"efl-1.18.1", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"devel/libsigcx", "pkgname"=>"libsigcx-0.6.6_8", "phase"=>"configure", "errortype"=>"configure_error"} + {"origin"=>"devel/mico", "pkgname"=>"mico-2.3.13_2", "phase"=>"build", "errortype"=>"bad_C++_code"} + {"origin"=>"devel/vera++", "pkgname"=>"vera++-1.3.0", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"editors/abiword-docs", "pkgname"=>"abiword-docs-3.0.1", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"editors/libreoffice4", "pkgname"=>"libreoffice4-4.3.7_8", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"editors/openoffice-4", "pkgname"=>"apache-openoffice-4.1.3", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"editors/openoffice-devel", "pkgname"=>"apache-openoffice-devel-4.2.1753426_2,4", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"graphics/ayam", "pkgname"=>"ayam-1.23", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"graphics/pixie", "pkgname"=>"pixie-2.2.6_12", "phase"=>"package", "errortype"=>"coredump"} + {"origin"=>"graphics/synfigstudio", "pkgname"=>"synfigstudio-1.0.2", "phase"=>"build", "errortype"=>"coredump"} + {"origin"=>"graphics/variety", "pkgname"=>"variety-0.5.4_2", "phase"=>"stage", "errortype"=>"???"} + {"origin"=>"lang/polyml", "pkgname"=>"polyml-5.6", "phase"=>"build", "errortype"=>"termios"} + {"origin"=>"net-im/licq", "pkgname"=>"licq-base-1.8.2_2", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"net-p2p/amule", "pkgname"=>"amule-2.3.2", "phase"=>"configure", "errortype"=>"configure_error"} + {"origin"=>"net-p2p/amule-devel", "pkgname"=>"amule-devel-10966_1", "phase"=>"configure", "errortype"=>"configure_error"} + {"origin"=>"science/orthanc", "pkgname"=>"orthanc-1.1.0", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"sysutils/catfish", "pkgname"=>"catfish-1.4.1", "phase"=>"configure", "errortype"=>"???"} + {"origin"=>"textproc/kenlm", "pkgname"=>"kenlm-20140830", "phase"=>"build/runaway", "errortype"=>"runaway_process"} + {"origin"=>"textproc/libkolabxml", "pkgname"=>"libkolabxml-1.1.6", "phase"=>"build", "errortype"=>"???"} + {"origin"=>"textproc/xalan-c", "pkgname"=>"xalan-c-1.11", "phase"=>"build", "errortype"=>"coredump"} Failure logs: http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/linuxsampler-1.0.0_5.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/firebird25-client-2.5.6_1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/efl-1.18.1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/libsigcx-0.6.6_8.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/mico-2.3.13_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/vera++-1.3.0.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/abiword-docs-3.0.1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/libreoffice4-4.3.7_8.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/apache-openoffice-4.1.3.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/apache-openoffice-devel-4.2.1753426_2,4.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/ayam-1.23.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/pixie-2.2.6_12.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/synfigstudio-1.0.2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/variety-0.5.4_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/polyml-5.6.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/licq-base-1.8.2_2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/amule-2.3.2.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/amule-devel-10966_1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/orthanc-1.1.0.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/catfish-1.4.1.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/kenlm-20140830.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/libkolabxml-1.1.6.log http://package18.nyi.freebsd.org/data/headi386PR213480-default/2016-10-27_20h07m00s/logs/errors/xalan-c-1.11.log databases/firebird25-client does build fine on unpatched head.
Thanks Antoine, the next i386 issue should be fixed by r308100.
Also, I now see the same behaviour from firebird25-client with and without the patch; that is, it reports: > operating system directive semaphore.h: enter: sem_wait() failed I suspect this is due to a kernel-userland mismatch on my machine on which I'm testing. I tested several others from the failing set and they failed before r308100 and built successfully after.
Exp-run looks fine.
A commit references this bug: Author: emaste Date: Fri Nov 4 19:35:49 UTC 2016 New revision: 308308 URL: https://svnweb.freebsd.org/changeset/base/308308 Log: Connect new LLVM-based libgcc_eh & libgcc_s to the build Compiler-rt and LLVM's libunwind provide a suitable replacement for libgcc.a, libgcc_eh.a, and libgcc_s.so. Remove the now-unused LLVM_LIBUNWIND block from gnu/lib/libgcc. PR: 213480 [exp-run] Reviewed by: brooks, ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8189 Changes: head/Makefile.inc1 head/gnu/lib/Makefile head/gnu/lib/libgcc/Makefile head/lib/Makefile
Committed in r308308, thanks for the assistance with the exp-run.
A commit references this bug: Author: dim Date: Mon May 4 22:59:40 UTC 2020 New revision: 360643 URL: https://svnweb.freebsd.org/changeset/base/360643 Log: Merge additions of LLVM libunwind libgcc_eh and libgcc_s. This is in preparation of further LLVM merges. MFC r307230 (by emaste): Introduce lib/libgcc_eh and lib/libgcc_s for LLVM's implementation They are not yet connected to the build, but I am adding them to allow for easier testing, ports exp-runs, etc. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8188 MFC r307231 (by emaste): libgcc_s: add libm dependencies from div{d,s,x}c3 compiler-rt's complex division support routines contain calls to compiler builtins such as `__builtin_scalbnl`. Unfortunately Clang turns these back into a call to `scalbnl`. For now link libm's C version of the required support routines. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8190 MFC r307864 (by emaste): Move the LLVM-based libgcc_s to /lib When enabled, it should install in the same location as the existing library. Reported by: antoine MFC r308001 (by emaste): libgcc_eh/libgcc_s: apply hidden visibility only to static libs MFC r308100 (by emaste): compile libunwind c source with -fexceptions When an exception is thrown the unwinder must unwind its own C source (starting with _Unwind_RaiseException in UnwindLevel1.c), so it needs to be built with unwinding data. MFC r308294 (by emaste): libgcc_s: make unspecified shlib symbols local We want only symbols explicitly specified in the Version.map. Sponsored by: The FreeBSD Foundation MFC r308308 (by emaste): Connect new LLVM-based libgcc_eh & libgcc_s to the build Compiler-rt and LLVM's libunwind provide a suitable replacement for libgcc.a, libgcc_eh.a, and libgcc_s.so. Remove the now-unused LLVM_LIBUNWIND block from gnu/lib/libgcc. PR: 213480 [exp-run] Reviewed by: brooks, ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8189 MFC r308379 (by emaste): add __divdi3 and __udivdi3 to libgcc_s symbol version map After r308294 they were missing on i386 (and previously were exported only accidentally). Reported by: antoine MFC r308445 (by emaste): add missing i386 symbols libgcc_s symbol version map After r308294 they were missing on i386 (and previously were exported only accidentally). Reported by: antoine MFC r312076 (by emaste): libgcc_s: add libc DT_NEEDED to fix underlinking PR: 216012 Reported by: jbeich Sponsored by: The FreeBSD Foundation MFC r316101 (by ngie): Apply r315689 to lib/libgcc_s as well to unbreak the gcc xtoolchain build lib/libgcc_s consumes lib/libcompiler_rt/Makefile*. The NO_WERROR.gcc in lib/libcompiler_rt/Makefile doesn't seem to have made a difference in being able to build this, so sprinkle NO_WERROR.gcc here as well. Reported by: Jenkins (FreeBSD-head-amd64-gcc) Tested with: amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc) Sponsored by: Dell EMC Isilon MFC r320673 (by emaste): Sort entries in libgcc_s Version.map MFC r337585 (by dim): In r308100, an explicit -fexceptions flag was added for the C sources from LLVM's libunwind, which end up in libgcc_eh.a and libgcc_s.so. This is because the unwinder needs the unwinder data for its own functions. However, for the C++ sources in libunwind, -fexceptions is already the default, and this can have the side effect of generating a reference to __gxx_personality_v0, the so-called personality function, which is normally provided by the C++ ABI library (libcxxrt or libsupc++). If the reference ends up in the eventual libgcc_s.so, linking any non-C++ programs against it will fail with "undefined reference to `__gxx_personality_v0'". Note that at high optimization levels, the reference is usually optimized away, which is why we have never noticed this problem before. With clang 7.0.0 though, higher optimization levels don't help anymore, since the addition of address-significance tables [1] in <https://reviews.llvm.org/rL337339>. Effectively, this always causes a reference to __gxx_personality_v0. After discussion with the upstream author of that change, it turns out that we should compile libunwind sources with the -fno-exceptions -funwind-tables flags instead. This ensures unwind tables are generated, but no references to any personality functions are emitted. [1] https://lists.llvm.org/pipermail/llvm-dev/2018-May/123514.html Reported by: jbeich PR: 230399 Changes: _U stable/11/ stable/11/Makefile.inc1 stable/11/gnu/lib/Makefile stable/11/gnu/lib/libgcc/Makefile stable/11/lib/Makefile stable/11/lib/libgcc_eh/ stable/11/lib/libgcc_eh/Makefile.inc stable/11/lib/libgcc_s/ stable/11/lib/libgcc_s/Makefile stable/11/lib/libgcc_s/Version.map