File tree 1 file changed +6
-1
lines changed 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -373,7 +373,12 @@ if [ -n "$SAGE_LOCAL" ]; then
373
373
# On OS X, test whether "ld-classic" is present in the installed
374
374
# version of the command-line tools. If so, we add "-ld_classic"
375
375
# to LD_FLAGS. See #36599.
376
- if [ " $UNAME " = " Darwin" ] && [ -x " $( xcode-select -p) /usr/bin/ld-classic" ] ; then
376
+ # When the full XCode is installed and in use, for example after
377
+ # "sudo xcode-select -s /Applications/Xcode.app", then "xcode-select -p"
378
+ # gives "/Applications/Xcode.app/Contents/Developer", but "ld-classic"
379
+ # is not in the subdirectory "usr/bin/" but rather in the subdirectory
380
+ # "Toolchains/XcodeDefault.xctoolchain/usr/bin/". See #37237.
381
+ if [ " $UNAME " = " Darwin" ] && [ -x " $( xcode-select -p) /usr/bin/ld-classic" -o -x " $( xcode-select -p) /Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic" ] ; then
377
382
LDFLAGS=" -L$SAGE_LOCAL /lib -Wl,-ld_classic,-rpath,$SAGE_LOCAL /lib $LDFLAGS "
378
383
else
379
384
LDFLAGS=" -L$SAGE_LOCAL /lib -Wl,-rpath,$SAGE_LOCAL /lib $LDFLAGS "
You can’t perform that action at this time.
0 commit comments