iains / gcc-darwin-arm64

GCC master branch for Darwin with experimental support for Arm64. Currently GCC-15.0.0 [September 2024]
GNU General Public License v2.0
268 stars 33 forks source link

Failed on stage 3 for building arm64 #105

Closed siriuscn closed 1 year ago

siriuscn commented 1 year ago

I tried the new pulled this branch with gcc14 imported.

Both stage 1 and stage 2 are passed. But stage 3 is failed with the below messages.

libtool: link: /Users/sirius/gcc/gcc-build-native-arm/./gcc/xgcc -B/Users/sirius/gcc/gcc-build-native-arm/./gcc/ -B/usr/arm64-apple-darwin/bin/ -B/usr/arm64-apple-darwin/lib/ -isystem /usr/arm64-apple-darwin/include -isystem /usr/arm64-apple-darwin/sys-include --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -fchecking=1 -dynamiclib -o .libs/libitm.1.dylib .libs/aatree.o .libs/alloc.o .libs/alloc_c.o .libs/alloc_cpp.o .libs/barrier.o .libs/beginend.o .libs/clone.o .libs/eh_cpp.o .libs/local.o .libs/query.o .libs/retry.o .libs/rwlock.o .libs/useraction.o .libs/util.o .libs/sjlj.o .libs/tls.o .libs/method-serial.o .libs/method-gl.o .libs/method-ml.o -L/Users/sirius/distributions/gcc/deps/lib /Users/sirius/distributions/gcc/deps/lib/libiconv.a -pthread -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=11.0 -Wl,-undefined -Wl,dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=11.0 -install_name /usr/lib/libitm.1.dylib -compatibility_version 2 -current_version 2.0 ld: warning: static initializer found in '.libs/aatree.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '.libs/beginend.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '.libs/method-serial.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '.libs/method-gl.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '.libs/method-ml.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: -undefined dynamic_lookup cannot be used to find '__ZdaPv' in dylib in dyld shared cache for architecture arm64 collect2: error: ld returned 1 exit status make[4]: [libitm.la] Error 1 make[3]: [all-recursive] Error 1 make[2]: [all] Error 2 make[1]: [all-target-libitm] Error 2 make: *** [all] Error 2

iains commented 1 year ago

what version of Xcode are you using? (and on what version of macOS?)

--- have you tested GCC-13.1 in the same environment?

(at the moment we're in the run up to 12.3 release so my resources are tied up with testing that)

siriuscn commented 1 year ago

what version of Xcode are you using? (and on what version of macOS?)

--- have you tested GCC-13.1 in the same environment?

(at the moment we're in the run up to 12.3 release so my resources are tied up with testing that)

Xcode 14.3 macOS 13.3.1 (a) (22E772610a)

GCC-13 was ok.

siriuscn commented 1 year ago

What's the usage of the libitum library?

State 3 is passed if I disable it with the option --disable-libitm.

The generated gcc binary can also compile codes successfully. And the compiled macho executable runs ok.

iains commented 1 year ago

the current sources I pushed yesterday build for me on: Arm64 Monterey with Xcode 14.3 CLT and SDK. x86_64 Ventura with Xcode 14.3 CLT and SDK.

For reference, libitm is used to support transactional memory accesses