@@ -373,32 +373,6 @@ if [ -n "$SAGE_LOCAL" ]; then
373373 # Construct and export LDFLAGS
374374 if [ " $UNAME " = " Darwin" ]; then
375375 LDFLAGS=" -L$SAGE_LOCAL /lib $LDFLAGS "
376- # On OS X, use the old linker if it is available.
377- # if "ld-classic" is present in the selected XCode
378- # toolchain, add "-Wl,-ld_classic" to LDFLAGS (see #36599) unless
379- # LD is already set, as it will be with conda on macOS. When the
380- # selected toolchain is in the Xcode app the output of "xcode-select -p"
381- # is "/Applications/Xcode.app/Contents/Developer", but "ld-classic" is
382- # not in the subdirectory "usr/bin/" but rather in the subdirectory
383- # "Toolchains/XcodeDefault.xctoolchain/usr/bin/". (See #37237.)
384- if [ -z " $LD " ]; then
385- # Running xcode-select on a system with no toolchain writes an
386- # error message to stderr, so redirect stderr to /dev/null.
387- XCODE_PATH=$( /usr/bin/xcode-select -p 2> /dev/null)
388- if [ -n $XCODE_PATH ]; then
389- if [ -x " $XCODE_PATH /usr/bin/ld-classic" -o \
390- -x " $XCODE_PATH /Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic" ]; then
391- LDFLAGS=" $LDFLAGS -Wl,-ld_classic"
392- fi
393- else
394- # On a macOS system with no toolchain we don't want this script
395- # to call gcc because that will also print an error message to
396- # stderr. We can avoid this by setting AS and LD to their
397- # default values.
398- AS=as
399- LD=ld
400- fi
401- fi
402376 fi
403377 if [ " $UNAME " = " Linux" ]; then
404378 LDFLAGS=" -L$SAGE_LOCAL /lib -Wl,-rpath,$SAGE_LOCAL /lib $LDFLAGS "
0 commit comments