Skip to content

Instantly share code, notes, and snippets.

@ilovezfs
Created June 8, 2018 08:05
Show Gist options
  • Save ilovezfs/e7add6ed38fae3ea3a9916145d2ff7e3 to your computer and use it in GitHub Desktop.
Save ilovezfs/e7add6ed38fae3ea3a9916145d2ff7e3 to your computer and use it in GitHub Desktop.
sed -e 's/__PFX__/__/g' \
-e 's/__FIXPTPFX__/__/g' < ../../../libgcc/libgcc-std.ver.in > libgcc-std.ver
{ cat libgcc-std.ver ../../../libgcc/config/libgcc-libsystem.ver \
| sed -e '/^[ ]*#/d' \
-e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' \
| /private/tmp/gcc-20180608-82442-jbm3t/gcc-8.1.0/build/./gcc/xgcc -B/private/tmp/gcc-20180608-82442-jbm3t/gcc-8.1.0/build/./gcc/ -B/usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/bin/ -B/usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/lib/ -isystem /usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/include -isystem /usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mmacosx-version-min=10.5 -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -mmacosx-version-min=10.5 -pipe -fno-common -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -E -xassembler-with-cpp -; \
} > tmp-libgcc.map.in
mv tmp-libgcc.map.in libgcc.map.in
{ /private/tmp/gcc-20180608-82442-jbm3t/gcc-8.1.0/build/./gcc/nm -pg _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulhc3_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _fixsfti_s.o _fixdfti_s.o _fixxfti_s.o _fixtfti_s.o _fixunssfti_s.o _fixunsdfti_s.o _fixunsxfti_s.o _fixunstfti_s.o _floattisf_s.o _floattidf_s.o _floattixf_s.o _floattitf_s.o _floatuntisf_s.o _floatuntidf_s.o _floatuntixf_s.o _floatuntitf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o darwin-64_s.o cpuinfo_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-darwin_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o emutls_s.o; echo %%; \
cat libgcc.map.in; \
} | awk -f ../../../libgcc/mkmap-flat.awk -v leading_underscore=1 > tmp-libgcc.map
warning: /usr/bin/nm: no name list
warning: /usr/bin/nm: no name list
warning: /usr/bin/nm: no name list
warning: /usr/bin/nm: no name list
warning: /usr/bin/nm: no name list
warning: /usr/bin/nm: no name list
warning: /usr/bin/nm: no name list
warning: /usr/bin/nm: no name list
warning: /usr/bin/nm: no name list
mv tmp-libgcc.map libgcc.map
# @multilib_flags@ is still needed because this may use
# /private/tmp/gcc-20180608-82442-jbm3t/gcc-8.1.0/build/./gcc/xgcc -B/private/tmp/gcc-20180608-82442-jbm3t/gcc-8.1.0/build/./gcc/ -B/usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/bin/ -B/usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/lib/ -isystem /usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/include -isystem /usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/sys-include and -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mmacosx-version-min=10.5 -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector directly.
# @multilib_dir@ is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/sh ../../../libgcc/../mkinstalldirs .
/private/tmp/gcc-20180608-82442-jbm3t/gcc-8.1.0/build/./gcc/xgcc -B/private/tmp/gcc-20180608-82442-jbm3t/gcc-8.1.0/build/./gcc/ -B/usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/bin/ -B/usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/lib/ -isystem /usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/include -isystem /usr/local/Cellar/gcc/8.1.0/x86_64-apple-darwin12.6.0/sys-include -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mmacosx-version-min=10.5 -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -dynamiclib -nodefaultlibs -install_name /usr/local/lib/gcc/8/libgcc_s.1.dylib -single_module -o ./libgcc_s.dylib -Wl,-exported_symbols_list,libgcc.map -compatibility_version 1 -current_version 1.0 -g -O2 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulhc3_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _fixsfti_s.o _fixdfti_s.o _fixxfti_s.o _fixtfti_s.o _fixunssfti_s.o _fixunsdfti_s.o _fixunsxfti_s.o _fixunstfti_s.o _floattisf_s.o _floattidf_s.o _floattixf_s.o _floattitf_s.o _floatuntisf_s.o _floatuntidf_s.o _floatuntixf_s.o _floatuntitf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o darwin-64_s.o cpuinfo_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-darwin_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc
0 0x10bb370e7 __assert_rtn + 144
0 0x10bb370e7 __assert_rtn + 144
0 0x10bb370e7 __assert_rtn + 144
0 0x10bb370e7 __assert_rtn + 144
0 0x10bb370e7 __assert_rtn + 144
0 0x10bb370e7 __assert_rtn + 144
1 0x10bb5c759 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3213
1 0x10bb5c759 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3213
1 0x10bb5c759 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3213
1 0x10bb5c759 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3213
1 0x10bb5c759 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3213
1 0x10bb5c759 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3213
2 0x10bb419e2 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 374
2 0x10bb419e2 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 374
2 0x10bb419e2 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 374
2 0x10bb419e2 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 374
2 0x10bb419e2 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 374
2 0x10bb419e2 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 374
3 0x10bb81303 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 651
3 0x10bb81303 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 651
3 0x10bb81303 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 651
3 0x10bb81303 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 651
3 0x10bb81303 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 651
3 0x10bb81303 ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 651
0 0x10bb370e7 __assert_rtn + 144
4 0x10bb82ff9 ld::tool::InputFiles::parseWorkerThread() + 271
4 0x10bb82ff9 ld::tool::InputFiles::parseWorkerThread() + 271
4 0x10bb82ff9 ld::tool::InputFiles::parseWorkerThread() + 271
4 0x10bb82ff9 ld::tool::InputFiles::parseWorkerThread() + 271
4 0x10bb82ff9 ld::tool::InputFiles::parseWorkerThread() + 271
1 0x10bb5c759 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3213
4 0x10bb82ff9 ld::tool::InputFiles::parseWorkerThread() + 271
5 0x10bee9772 _pthread_start + 327
5 0x10bee9772 _pthread_start + 327
5 0x10bee9772 _pthread_start + 327
2 0x10bb419e2 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 374
5 0x10bee9772 _pthread_start + 327
5 0x10bee9772 _pthread_start + 327
A linker snapshot was created at:
/tmp/libgcc_s.dylib-2018-05-08-010125.ld-snapshot
A linker snapshot was created at:
/tmp/libgcc_s.dylib-2018-05-08-010125.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /SourceCache/ld64/ld64-236.4/src/ld/parsers/macho_relocatable_file.cpp, line 1685.
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /SourceCache/ld64/ld64-236.4/src/ld/parsers/macho_relocatable_file.cpp, line 1685.
5 0x10bee9772 _pthread_start + 327
A linker snapshot was created at:
/tmp/libgcc_s.dylib-2018-05-08-010125.ld-snapshot
A linker snapshot was created at:
/tmp/libgcc_s.dylib-2018-05-08-010125.ld-snapshot
collect2: error: ld returned 1 exit status
make[3]: *** [libgcc_s.dylib] Error 1
make[2]: *** [all-stage1-target-libgcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
/usr/local/Homebrew/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: make
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment