summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2020-05-13 10:21:46 +0100
committerDavid Allsopp <david.allsopp@metastack.com>2020-05-13 10:21:46 +0100
commit9c0412f41ab194b286d27bf4156252b797cd38c2 (patch)
tree1165b5152d56d9392898ae3ff682d03f50769733 /configure
parent83c4909d525514d7b68dab4c8a33aa25f9d86277 (diff)
downloadocaml-9c0412f41ab194b286d27bf4156252b797cd38c2.tar.gz
Always permit triplet-prefixed ld in PACKLD
Fixes #7121
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
1 files changed, 17 insertions, 14 deletions
diff --git a/configure b/configure
index f0bba08bb8..3b4d3cebd6 100755
--- a/configure
+++ b/configure
@@ -14034,28 +14034,31 @@ else
fi
if test -z "$PARTIALLD"; then :
- # The string for PACKLD must be capable of being concatenated with the
- # output filename. Don't assume that all C compilers understand GNU -ofoo
- # form, so ensure that the definition includes a space at the end (which is
- # achieved using the $(EMPTY) expansion trick).
case "$arch,$CC,$system,$model" in #(
amd64,gcc*,macosx,*) :
- PACKLD='ld -r -arch x86_64 -o $(EMPTY)' ;; #(
+ PACKLD_FLAGS=' -arch x86_64' ;; #(
amd64,gcc*,solaris,*) :
- PACKLD='ld -r -m elf_x86_64 -o $(EMPTY)' ;; #(
+ PACKLD_FLAGS=' -m elf_x86_64' ;; #(
power,gcc*,elf,ppc) :
- PACKLD='ld -r -m elf32ppclinux -o $(EMPTY)' ;; #(
+ PACKLD_FLAGS=' -m elf32ppclinux' ;; #(
power,gcc*,elf,ppc64) :
- PACKLD='ld -r -m elf64ppc -o $(EMPTY)' ;; #(
+ PACKLD_FLAGS=' -m elf64ppc' ;; #(
power,gcc*,elf,ppc64le) :
- PACKLD='ld -r -m elf64lppc -o $(EMPTY)' ;; #(
- # For the Microsoft C compiler there must be no space at the end of the
- # string.
- *,cl,*,*) :
- PACKLD="link -lib -nologo $machine -out:" ;; #(
+ PACKLD_FLAGS=' -m elf64lppc' ;; #(
*) :
- PACKLD="$DIRECT_LD -r -o \$(EMPTY)" ;;
+ PACKLD_FLAGS='' ;;
esac
+ # The string for PACKLD must be capable of being concatenated with the
+ # output filename. Don't assume that all C compilers understand GNU -ofoo
+ # form, so ensure that the definition includes a space at the end (which is
+ # achieved using the $(EMPTY) expansion trick).
+ if test x"$CC" = "xcl"; then :
+ # For the Microsoft C compiler there must be no space at the end of the
+ # string.
+ PACKLD="link -lib -nologo $machine -out:"
+else
+ PACKLD="$DIRECT_LD -r$PACKLD_FLAGS -o \$(EMPTY)"
+fi
else
PACKLD="$PARTIALLD -o \$(EMPTY)"
fi