diff options
author | David Allsopp <david.allsopp@metastack.com> | 2020-05-13 10:21:46 +0100 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2020-05-13 10:21:46 +0100 |
commit | 9c0412f41ab194b286d27bf4156252b797cd38c2 (patch) | |
tree | 1165b5152d56d9392898ae3ff682d03f50769733 /configure | |
parent | 83c4909d525514d7b68dab4c8a33aa25f9d86277 (diff) | |
download | ocaml-9c0412f41ab194b286d27bf4156252b797cd38c2.tar.gz |
Always permit triplet-prefixed ld in PACKLD
Fixes #7121
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 31 |
1 files changed, 17 insertions, 14 deletions
@@ -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 |