diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | arch/sparc/Makefile | 11 | ||||
-rw-r--r-- | arch/sparc64/Makefile | 11 |
3 files changed, 23 insertions, 1 deletions
@@ -178,7 +178,7 @@ endif | |||
178 | # SUBARCH is subsequently ignored. | 178 | # SUBARCH is subsequently ignored. |
179 | 179 | ||
180 | ifneq ($(CROSS_COMPILE),) | 180 | ifneq ($(CROSS_COMPILE),) |
181 | SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1) | 181 | SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1 | sed 's:^.*/::g') |
182 | else | 182 | else |
183 | SUBARCH := $(shell uname -m) | 183 | SUBARCH := $(shell uname -m) |
184 | endif | 184 | endif |
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile new file mode 100644 index 000000000..0b1c56cb5 --- /dev/null +++ b/arch/sparc/Makefile | |||
@@ -0,0 +1,11 @@ | |||
1 | # When building a library, even intra-library references, | ||
2 | # such as from find_applet_by_name() to applet_names[], | ||
3 | # don't work with -fpic on sparc, needs -fPIC. | ||
4 | # Don't know why it fails in this case but works when | ||
5 | # a binary is being built. | ||
6 | # | ||
7 | # (if is superfluous, ARCH_FPIC is only used by library build, but it | ||
8 | # demonstrates the point: non-pic binary does not need it) | ||
9 | ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y) | ||
10 | ARCH_FPIC = -fPIC | ||
11 | endif | ||
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile new file mode 100644 index 000000000..0b1c56cb5 --- /dev/null +++ b/arch/sparc64/Makefile | |||
@@ -0,0 +1,11 @@ | |||
1 | # When building a library, even intra-library references, | ||
2 | # such as from find_applet_by_name() to applet_names[], | ||
3 | # don't work with -fpic on sparc, needs -fPIC. | ||
4 | # Don't know why it fails in this case but works when | ||
5 | # a binary is being built. | ||
6 | # | ||
7 | # (if is superfluous, ARCH_FPIC is only used by library build, but it | ||
8 | # demonstrates the point: non-pic binary does not need it) | ||
9 | ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y) | ||
10 | ARCH_FPIC = -fPIC | ||
11 | endif | ||