summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rules.mak7
-rw-r--r--extra/Configs/Config.arm2
-rw-r--r--extra/Configs/Config.cris.default1
-rw-r--r--extra/Configs/Config.in19
-rw-r--r--ldso/util/Makefile6
-rw-r--r--libc/Makefile20
-rw-r--r--libc/misc/wchar/Makefile2
7 files changed, 14 insertions, 43 deletions
diff --git a/Rules.mak b/Rules.mak
index c02d48823..aa2fe37fa 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -226,9 +226,14 @@ ifeq ($(HAVE_SHARED),y)
BUILD_DYNAMIC_LINKER:=/lib/$(strip $(subst ",, $(notdir $(SYSTEM_LDSO))))
endif
endif
-ifeq ($(UCLIBC_HAS_SOFT_FLOAT),y)
+
+LDADD_LIBFLOAT=
+ifeq ($(strip $(UCLIBC_HAS_SOFT_FLOAT)),y)
CFLAGS += $(call check_gcc,-msoft-float,)
#LDFLAGS+= -Wa,-mno-fpu
+ifeq ($(strip $(TARGET_ARCH)),arm)
+ LDADD_LIBFLOAT=-lfloat
+endif
endif
CFLAGS_NOPIC:=$(CFLAGS)
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index 7331188a6..c7ec716e0 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -80,11 +80,9 @@ choice
Endian, or Little Endian.
config ARCH_LITTLE_ENDIAN
- select ADD_LIBGCC_FUNCTIONS
bool "Little Endian"
config ARCH_BIG_ENDIAN
- select ADD_LIBGCC_FUNCTIONS
bool "Big Endian"
endchoice
diff --git a/extra/Configs/Config.cris.default b/extra/Configs/Config.cris.default
index 94fa89a50..21e4645e4 100644
--- a/extra/Configs/Config.cris.default
+++ b/extra/Configs/Config.cris.default
@@ -21,7 +21,6 @@ HAVE_DOT_CONFIG=y
#
DOPIC=y
HAVE_SHARED=y
-ADD_LIBGCC_FUNCTIONS=y
BUILD_UCLIBC_LDSO=y
# LDSO_LDD_SUPPORT is not set
UCLIBC_CTOR_DTOR=y
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index a275e3594..82e633839 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -27,23 +27,6 @@ config HAVE_SHARED
answer Y here. If you only want to build uClibc as a static library,
then answer N.
-config ADD_LIBGCC_FUNCTIONS
- bool "Add unresolved libgcc symbols to uClibc"
- depends on HAVE_SHARED
- default n
- help
- If you answer Y here, all unresolved functions provided by the libgcc
- library that are used by uClibc will be added directly into the
- uClibc library. If your gcc compiler only provides a static libgcc
- library, then enabling this option can reduce the size of your
- binaries by preventing these functions from being staticly linked
- into every binary. If you have compiled uClibc as PIC code, one
- potential size effect of this option is that you may end up adding
- non-PIC libgcc code into your shared uClibc library, resulting in a
- non sharable text segment (thereby wasting a bunch of ram). If your
- compiler supports a shared libgcc library, you should certainly leave
- this option disabled. Regardless, the safest answer is N.
-
config BUILD_UCLIBC_LDSO
bool "Compile native shared library loader"
depends on HAVE_SHARED
@@ -56,7 +39,7 @@ config BUILD_UCLIBC_LDSO
config FORCE_SHAREABLE_TEXT_SEGMENTS
bool "Only load shared libraries which can share their text segment"
- depends on BUILD_UCLIBC_LDSO && UCLIBC_COMPLETELY_PIC && !ADD_LIBGCC_SYMBOLS
+ depends on BUILD_UCLIBC_LDSO && UCLIBC_COMPLETELY_PIC
default n
help
If you answer Y here, the uClibc native shared library loader will
diff --git a/ldso/util/Makefile b/ldso/util/Makefile
index 9064c367b..ac720f64f 100644
--- a/ldso/util/Makefile
+++ b/ldso/util/Makefile
@@ -46,7 +46,7 @@ readelf: readelf.c
strip -x -R .note -R .comment $@
readelf.target: readelf.c
- $(TARGET_CC) $(CFLAGS) -Wl,-s $^ -o $@
+ $(TARGET_CC) $(CFLAGS) -Wl,-s $^ -o $@ $(LDADD_LIBFLOAT)
$(STRIPTOOL) -x -R .note -R .comment $@
readsoname.o: readsoname.c readsoname2.c
@@ -75,7 +75,7 @@ ldconfig.target: ldconfig.c readsoname.c
-DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
-DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
-DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \
- $^ -o $@
+ $^ -o $@ $(LDADD_LIBFLOAT)
$(STRIPTOOL) -x -R .note -R .comment $@
ldd: ldd.c
@@ -91,7 +91,7 @@ ldd.target: ldd.c
-DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
-DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
-DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
- $^ -o $@
+ $^ -o $@ $(LDADD_LIBFLOAT)
$(STRIPTOOL) -x -R .note -R .comment $@
clean:
diff --git a/libc/Makefile b/libc/Makefile
index f93b07da9..0e3f2ead6 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -36,12 +36,6 @@ else
CRTOBJS=../../lib/crt0.o
endif
-ifeq ($(strip $(ADD_LIBGCC_FUNCTIONS)),y)
-LIBGCC_NEED=./tmp/libgcc-need.a
-else
-LIBGCC=
-endif
-
DIRS = misc pwd_grp stdio string termios inet signal stdlib sysdeps unistd
# Check if the target architecture has a version script for
@@ -60,11 +54,11 @@ ar-target:
$(LIBNAME): subdirs ar-target
-shared: $(TOPDIR)lib/$(LIBNAME) $(LIBGCC_NEED)
+shared: $(TOPDIR)lib/$(LIBNAME)
$(LD) $(LDFLAGS) $(VERSION_SCRIPT) -soname=$(SHARED_MAJORNAME) -o $(SHARED_FULLNAME) \
- --whole-archive $(LIBGCC_NEED) $(LIBNAME) \
+ --whole-archive $(LIBNAME) \
$(TOPDIR)/libc/misc/internals/interp.o --no-whole-archive \
- -init __uClibc_init $(LIBGCC)
+ -init __uClibc_init
@true #$(RM) -r tmp
$(INSTALL) -d $(TOPDIR)lib
$(RM) $(TOPDIR)lib/$(SHARED_FULLNAME)
@@ -72,14 +66,6 @@ shared: $(TOPDIR)lib/$(LIBNAME) $(LIBGCC_NEED)
$(LN) -sf $(SHARED_FULLNAME) $(TOPDIR)lib/libc.so
$(LN) -sf $(SHARED_FULLNAME) $(TOPDIR)lib/$(SHARED_MAJORNAME)
-$(LIBGCC_NEED): $(TOPDIR)lib/$(LIBNAME)
- @$(RM) -r tmp
- @mkdir tmp
- $(AR) rv $@
- (cd tmp && CC="$(CC)" LD="$(LD)" LDFLAGS="$(CPU_LDFLAGS-y)" \
- NM="$(NM)" AR="$(AR)" LIBGCC="$(LIBGCC)" CRTOBJS="$(CRTOBJS)" \
- /bin/sh $(TOPDIR)../extra/scripts/get-needed-libgcc-objects.sh)
-
halfclean:
@$(RM) $(LIBNAME) uClibc_config.h
@$(RM) $(SHARED_FULLNAME) $(SHARED_MAJORNAME) uClibc-0.* libc.so*
diff --git a/libc/misc/wchar/Makefile b/libc/misc/wchar/Makefile
index c449e3f91..f44a9c3a5 100644
--- a/libc/misc/wchar/Makefile
+++ b/libc/misc/wchar/Makefile
@@ -62,7 +62,7 @@ $(MOBJ2): $(MSRC2)
$(STRIPTOOL) -x -R .note -R .comment $*.o
iconv.target: wchar.c
- $(TARGET_CC) $(CFLAGS) -DL_iconv_main wchar.c -o $@
+ $(TARGET_CC) $(CFLAGS) -DL_iconv_main wchar.c -o $@ $(LDADD_LIBFLOAT)
$(STRIPTOOL) -x -R .note -R .comment $@
clean: