sparc: needs -fPIC
Pinted out by Thomas Petazzoni. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
61f9d76ec5
commit
1ef3ce91c7
2
Makefile
2
Makefile
@ -178,7 +178,7 @@ endif
|
||||
# SUBARCH is subsequently ignored.
|
||||
|
||||
ifneq ($(CROSS_COMPILE),)
|
||||
SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1)
|
||||
SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1 | sed 's:^.*/::g')
|
||||
else
|
||||
SUBARCH := $(shell uname -m)
|
||||
endif
|
||||
|
11
arch/sparc/Makefile
Normal file
11
arch/sparc/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# When building a library, even intra-library references,
|
||||
# such as from find_applet_by_name() to applet_names[],
|
||||
# don't work with -fpic on sparc, needs -fPIC.
|
||||
# Don't know why it fails in this case but works when
|
||||
# a binary is being built.
|
||||
#
|
||||
# (if is superfluous, ARCH_FPIC is only used by library build, but it
|
||||
# demonstrates the point: non-pic binary does not need it)
|
||||
ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
|
||||
ARCH_FPIC = -fPIC
|
||||
endif
|
11
arch/sparc64/Makefile
Normal file
11
arch/sparc64/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# When building a library, even intra-library references,
|
||||
# such as from find_applet_by_name() to applet_names[],
|
||||
# don't work with -fpic on sparc, needs -fPIC.
|
||||
# Don't know why it fails in this case but works when
|
||||
# a binary is being built.
|
||||
#
|
||||
# (if is superfluous, ARCH_FPIC is only used by library build, but it
|
||||
# demonstrates the point: non-pic binary does not need it)
|
||||
ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
|
||||
ARCH_FPIC = -fPIC
|
||||
endif
|
Loading…
Reference in New Issue
Block a user