[Lsb-messages] /var/www/bzr/lsb/devel/build_env r2314: additional tweaking for bug 4161: use libc_nonshared for dso

Mats Wichmann mats at linuxfoundation.org
Tue May 3 14:06:42 UTC 2016


------------------------------------------------------------
revno: 2314
committer: Mats Wichmann <mats at linuxfoundation.org>
branch nick: build_env
timestamp: Tue 2016-05-03 08:06:42 -0600
message:
  additional tweaking for bug 4161: use libc_nonshared for dso
modified:
  lsbdev-cc/lsbcc.c
  package/Makefile
-------------- next part --------------
=== modified file 'lsbdev-cc/lsbcc.c'
--- a/lsbdev-cc/lsbcc.c	2016-05-02 16:30:19 +0000
+++ b/lsbdev-cc/lsbcc.c	2016-05-03 14:06:42 +0000
@@ -93,6 +93,7 @@
 struct argvgroup *syslibs;
 struct argvgroup *gccargs;
 struct argvgroup *lsblibs;
+struct argvgroup *dsolibs;
 struct argvgroup *gccstartargs;
 
 /*
@@ -1067,6 +1068,7 @@
     libpaths = argvinit("libpaths");
     userlibs = argvinit("userlibs");
     syslibs = argvinit("syslibs");
+    dsolibs = argvinit("dsolibs");
     gccargs = argvinit("gccargs");
 
     /* Determine if we are being called for C or C++ */
@@ -1897,6 +1899,8 @@
 	argvaddstring(syslibs, "-lm");
 	argvaddstring(syslibs, "-lc");
 	argvaddstring(syslibs, "-lc_nonshared");
+	/* and in case we need to use the alternate chain for shared libs */
+	argvaddstring(dsolibs, "-lc_nonshared");
 
 	/* to be pedantic, we do gcc_s and gcc again */
 	if (lsbccmode == LSBCPLUS) {
@@ -2040,12 +2044,16 @@
 	    argvappend(gccargs, proginterp);
 	}
 
-	/* bug 4161: don't add syslibs if linking a shared library */
-	if (!lsbcc_buildingshared)
+	/* 
+	 * bug 4161: don't add syslibs if linking a shared library
+	 * we do need libc_nonshared, though. Maybe also pthread_nonshared?
+	 */
+	if (lsbcc_buildingshared)
+	    argvappend(gccargs, dsolibs);
+	else
 	    argvappend(gccargs, syslibs);
     }
 
-
     /* ensure argument list is null terminated */
     gccargs->argv[gccargs->numargv] = NULL;
 

=== modified file 'package/Makefile'
--- a/package/Makefile	2016-05-02 16:30:19 +0000
+++ b/package/Makefile	2016-05-03 14:06:42 +0000
@@ -54,7 +54,7 @@
 
 # We define this here instead of directly in the spec file as
 # we need to be able to work out what the produced rpm files will be called
-BUILDNO=5
+BUILDNO=6
 
 # Initialize LIB64 to proper value for 64-bit architectures
 export LIB64:=$(shell case `uname -m` in (ppc64 | s390x | x86_64) echo 64 ;; esac)



More information about the lsb-messages mailing list