summaryrefslogtreecommitdiff
path: root/libc/Makefile
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-09-26 17:31:47 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-09-26 17:31:47 +0000
commit9ddd9870a8be521ba9153efad60715149a320f65 (patch)
tree6014258b1ec2071b91d9dbc92e7d82016320e1e0 /libc/Makefile
parent9d36ab8993de4cb950f05d038ae645fc8963d5c9 (diff)
Add __cxa_atexit and __cxa_finalize, thanks to Stephen Warren. This patch breaks compatibility with existing binaries, unless the new COMPAT_ATEXIT option is enabled.
Diffstat (limited to 'libc/Makefile')
-rw-r--r--libc/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/libc/Makefile b/libc/Makefile
index cfb4840b4..4d528af8f 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -86,8 +86,19 @@ shared: shared_$(LIBNAME)
$(INSTALL) -d $(TOPDIR)lib
$(RM) $(TOPDIR)lib/$(SHARED_FULLNAME)
$(INSTALL) -m 644 $(SHARED_FULLNAME) $(TOPDIR)lib
- $(LN) -sf $(SHARED_FULLNAME) $(TOPDIR)lib/libc.so
$(LN) -sf $(SHARED_FULLNAME) $(TOPDIR)lib/$(SHARED_MAJORNAME)
+ $(AR) $(ARFLAGS) $(TOPDIR)lib/$(NONSHARED_LIBNAME) `cat nonshared_obj.*`
+ $(RANLIB) $(TOPDIR)lib/$(NONSHARED_LIBNAME)
+ echo "/* GNU ld script" > $(TOPDIR)lib/libc.so
+ echo " * Use the shared library, but some functions are only in" >> $(TOPDIR)lib/libc.so
+ echo " * the static library, so try that secondarily. */" >> $(TOPDIR)lib/libc.so
+ #OUT_FORMAT:=$(shell $(LD) --verbose | grep OUTPUT_FORMAT | awk -F '"' '{print $2}')
+ #echo "OUTPUT_FORMAT($(OUT_FORMAT))" >> $(TOPDIR)lib/libc.so
+ifeq ($(strip $(COMPAT_ATEXIT)),y)
+ echo "GROUP ( $(TOPDIR)lib/$(NONSHARED_LIBNAME) $(TOPDIR)lib/$(SHARED_MAJORNAME) )" >> $(TOPDIR)lib/libc.so
+else
+ echo "GROUP ( $(TOPDIR)lib/$(SHARED_MAJORNAME) $(TOPDIR)lib/$(NONSHARED_LIBNAME) )" >> $(TOPDIR)lib/libc.so
+endif
halfclean:
$(RM) $(LIBNAME) shared_$(LIBNAME) $(SHARED_FULLNAME)
@@ -96,7 +107,7 @@ tags:
ctags -R
clean: subdirs_clean halfclean
- $(RM) obj.*
+ $(RM) obj.* nonshared_obj.*
subdirs: $(patsubst %, _dir_%, $(DIRS))
subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))