I get exactly the same error with: export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9"
I will also try removing those options. - Marc On Wed, Sep 20, 2023 at 10:48 AM Marc Culler <marc.cul...@gmail.com> wrote: > Thanks for replying! > > The reason for the options "-mno-avx -mno-avx2 -mno-bmi2" is that it is > important for us to have a gmp which runs on old intel hardware. And we > had no trouble with those options until this version of clang. > > Also, the function in which ld claims to find the out-of-range branch8 is > written in assembly language. However, ld may be lying. There is no > branch instruction in the .asm file, and disassembly of the .o file also > shows no branch instruction. > > I will try removing those options and see what happens. > > - Marc > > > > On Wed, Sep 20, 2023 at 10:33 AM Torbjörn Granlund <t...@gmplib.org> wrote: > >> Marc Culler <marc.cul...@gmail.com> writes: >> >> I am unable to build gmp-6.2.1 on macOS Sonoma beta using the command >> line >> tools released for that system. The system is up to date. The hardware >> of >> the build system is "1.6 GHz Dual-Core Intel Core i5". >> >> The build commands I am using are: >> $ export GMPPREFIX=/a/path/on/my/system >> $ export CFLAGS="-arch x86_64 -mmacosx-version-min=10.9 -mno-avx >> -mno-avx2 >> -mno-bmi2" >> $ ./configure --with-pic --build=x86_64-none-darwin >> --host=x86_64-none-darwin --enable-fat --prefix=${GMPPREFIX}/intel >> >> The error message I get is: >> ld: branch8 out of range 501588 in ___gmpn_add_nc_x86_64 >> >> The error occurs when using: "Apple clang version 15.0.0 >> (clang-1500.0.40.1)" >> >> Have you tried letting GMP figure out how to best compile things? >> >> You want to retain the --enable-fat option only. >> >> Passing an arm long set of options usually makes the build worse, or >> breaks it completely. >> >> -- >> Torbjörn >> Please encrypt, key id 0xC8601622 >> > _______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs