Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[sb2] Don't pass -r using -Wl,-r
If using -Wl,-r to manually pass the option LD would error out and say:
/usr/bin/ld: -r and -pie may not be used together
when using a compiler that enables -fPIE by default.
By using just -r and telling the compiler to pass it to the linker on
its on to the linker it avoids this error.
  • Loading branch information
Thaodan committed Oct 23, 2020
1 parent 4bf15fa commit fc3eefe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scratchbox2/llbuild/Makefile.include
Expand Up @@ -82,12 +82,12 @@ endif
%.a::
$(MKOUTPUTDIR)
$(P)ARCHIVE
$(Q)$(CC) $(LDFLAGS) -Wl,-r -nostdlib -nodefaultlibs -nostartfiles -o $@ $^
$(Q)$(CC) $(LDFLAGS) -r -nostdlib -nodefaultlibs -nostartfiles -o $@ $^

built-in.o:: %.o
$(MKOUTPUTDIR)
$(P)BUILTIN
$(Q)$(CC) -Wl,-r -nostdlib -nodefaultlibs -nostartfiles -o $@ $^
$(Q)$(CC) -r -nostdlib -nodefaultlibs -nostartfiles -o $@ $^

%.o:: %.S
$(MKOUTPUTDIR)
Expand Down

0 comments on commit fc3eefe

Please sign in to comment.