diff options
Diffstat (limited to 'gcc/ada/gcc-interface/Make-lang.in')
-rw-r--r-- | gcc/ada/gcc-interface/Make-lang.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index a2a867b..964cae8 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -271,8 +271,14 @@ GCC_LINKERFLAGS = $(filter-out -Werror, $(ALL_LINKERFLAGS)) GCC_LDFLAGS = $(LDFLAGS) endif -GCC_LINK=$(LINKER) $(GCC_LINKERFLAGS) $(GCC_LDFLAGS) +# Do not link with -pie during stage #1 because the base libgnat.a is not PIC +ifeq ($(STAGE1),True) +GCC_LINK= $(filter-out -pie, $(LINKER) $(GCC_LINKERFLAGS) $(GCC_LDFLAGS)) +GCC_LLINK=$(filter-out -pie, $(LLINKER) $(GCC_LINKERFLAGS) $(GCC_LDFLAGS)) +else +GCC_LINK= $(LINKER) $(GCC_LINKERFLAGS) $(GCC_LDFLAGS) GCC_LLINK=$(LLINKER) $(GCC_LINKERFLAGS) $(GCC_LDFLAGS) +endif # Lists of files for various purposes. |