summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
-rw-r--r--Makefile.in14
-rw-r--r--Makerules4
-rw-r--r--libc/Makefile.in2
4 files changed, 31 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fcee9755a..94ded0442 100644
--- a/Makefile
+++ b/Makefile
@@ -245,6 +245,19 @@ ifeq ($(HAVE_SHARED),y)
$(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
sed -e '/^GROUP/d' $(TOPDIR)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
fi
+ifeq ($(UCLIBC_HAS_SSP),y)
+ifeq ($(COMPAT_ATEXIT),y)
+ if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
+ echo "GROUP ( $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) AS_NEEDED ( $(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO) ) )" \
+ >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
+ fi
+else
+ if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
+ echo "GROUP ( $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) AS_NEEDED $(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO) ) )" \
+ >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
+ fi
+endif
+else
ifeq ($(COMPAT_ATEXIT),y)
if [ -f $(TOPDIR)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
echo "GROUP ( $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) )" \
@@ -256,6 +269,7 @@ else
>> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
fi
endif
+endif
ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
$(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
$(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
diff --git a/Makefile.in b/Makefile.in
index d80b1d8ef..8d8065696 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -234,6 +234,19 @@ ifeq ($(HAVE_SHARED),y)
$(RM) $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
sed -e '/^GROUP/d' $(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
fi
+ifeq ($(UCLIBC_HAS_SSP),y)
+ifeq ($(COMPAT_ATEXIT),y)
+ if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
+ echo "GROUP ( $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) AS_NEEDED ( $(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO) ) )" \
+ >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
+ fi
+else
+ if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
+ echo "GROUP ( $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) AS_NEEDED ( $(RUNTIME_PREFIX)lib/$(UCLIBC_LDSO) ) )" \
+ >> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
+ fi
+endif
+else
ifeq ($(COMPAT_ATEXIT),y)
if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) ] ; then \
echo "GROUP ( $(DEVEL_PREFIX)lib/$(NONSHARED_LIBNAME) $(RUNTIME_PREFIX)lib/$(SHARED_MAJORNAME) )" \
@@ -245,6 +258,7 @@ else
>> $(PREFIX)$(DEVEL_PREFIX)lib/libc.so; \
fi
endif
+endif
ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
$(LN) -sf $(RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB)libthread_db.so.1 \
$(PREFIX)$(DEVEL_PREFIX)lib/libthread_db.so
diff --git a/Makerules b/Makerules
index 1c9949448..b6896c63b 100644
--- a/Makerules
+++ b/Makerules
@@ -143,9 +143,9 @@ else
echo " * the static library, so try that secondarily. */" >> $@
ifeq ($(UCLIBC_HAS_SSP),y)
ifeq ($(COMPAT_ATEXIT),y)
- echo "GROUP ( $(top_builddir)lib/$(NONSHARED_LIBNAME) $(top_builddir)lib/$(SHARED_MAJORNAME) AS_NEEDED ($(top_builddir)lib/$(UCLIBC_LDSO) ) )" >> $@
+ echo "GROUP ( $(top_builddir)lib/$(NONSHARED_LIBNAME) $(top_builddir)lib/$(SHARED_MAJORNAME) AS_NEEDED ( $(top_builddir)lib/$(UCLIBC_LDSO) ) )" >> $@
else
- echo "GROUP ( $(top_builddir)lib/$(SHARED_MAJORNAME) $(top_builddir)lib/$(NONSHARED_LIBNAME) AS_NEEDED ($(top_builddir)lib/$(UCLIBC_LDSO) ) )" >> $@
+ echo "GROUP ( $(top_builddir)lib/$(SHARED_MAJORNAME) $(top_builddir)lib/$(NONSHARED_LIBNAME) AS_NEEDED ( $(top_builddir)lib/$(UCLIBC_LDSO) ) )" >> $@
endif
else
ifeq ($(COMPAT_ATEXIT),y)
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 62a522066..88b61819a 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -41,5 +41,5 @@ EXTRA_LINK_LIBS:=$(libc_OUT)/misc/internals/interp.os $(top_builddir)lib/$(UCLIB
objclean-y+=libc_clean
-lib-a-y+=$(top_builddir)lib/libc.a
+lib-a-y+=$(top_builddir)lib/libc.a crt-y
lib-so-y+=$(top_builddir)lib/libc.so $(top_builddir)lib/$(NONSHARED_LIBNAME) crt-y other-y