Skip to content

Commit

Permalink
[POWERPC] Specify GNUTARGET on $(AR) invocations
Browse files Browse the repository at this point in the history
Without this, some versions of GNU ar fail to create
an archive index if the object files it is packing
together are of a different object format than ar's
default format (for example, binutils compiled to
default to 64-bit, with 32-bit objects).

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Segher Boessenkool authored and Paul Mackerras committed May 17, 2007
1 parent 847f597 commit 8995ac8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CROSS32CC := $(CC) -m32
CROSS32AS := $(AS) -a32
CROSS32LD := $(LD) -m elf32ppc
CROSS32OBJCOPY := $(OBJCOPY)
CROSS32AR := $(AR)
CROSS32AR := GNUTARGET=elf32-powerpc $(AR)
endif
endif

Expand Down Expand Up @@ -58,6 +58,7 @@ ifeq ($(HAS_BIARCH),y)
override AS += -a$(SZ)
override LD += -m elf$(SZ)ppc
override CC += -m$(SZ)
override AR := GNUTARGET=elf$(SZ)-powerpc $(AR)
endif

LDFLAGS_vmlinux := -Bstatic
Expand Down

0 comments on commit 8995ac8

Please sign in to comment.