Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Michael Haubenwallner (haubi)" <haubi@g.o>
Subject: gentoo-alt r1655 - trunk/toolchain-prefix-wrapper/ld
Date: Mon, 06 Jul 2009 14:19:21 +0000
Author: haubi
Date: 2009-07-06 14:19:20 +0000 (Mon, 06 Jul 2009)
New Revision: 1655

Modified:
   trunk/toolchain-prefix-wrapper/ld/hpuxplugin.c
Log:
always filter all default lib- and runpaths added by gcc and ld from
cmdline, re-add gcc-ones always and ld-defaults upon "+b :" only.


Modified: trunk/toolchain-prefix-wrapper/ld/hpuxplugin.c
===================================================================
--- trunk/toolchain-prefix-wrapper/ld/hpuxplugin.c	2009-07-06 12:41:01 UTC (rev 1654)
+++ trunk/toolchain-prefix-wrapper/ld/hpuxplugin.c	2009-07-06 14:19:20 UTC (rev 1655)
@@ -38,6 +38,7 @@
 
 	/* ELF settings */
 	bool needLibpathAsRunpath = true;
+	bool needAutoRunpath = false;
 	UseRpathFlag useRpathFlag = UseRpath_Last;
 	bool needCDPflag = false; /* need +cdp linker flag to drop DESTDIR */
 
@@ -82,26 +83,58 @@
 		if (autoRunpathList == NULL)
 			break;
 
-		if (strncmp(StringGetBuffer(data->in->host.triplet), "ia64", strlen("ia64")) == 0) {
+#define STRnLEN(x) (x), strlen((x))
+		argBuffer = StringGetBuffer(data->in->host.triplet);
+		if (strncmp(argBuffer, "ia64", strlen("ia64")) == 0) {
 			isIA64 = true;
-			is64bit = false;
-			if (StringGetBuffer(data->in->host.triplet)[strlen("ia64")] == 'w') {
+			if (argBuffer[strlen("ia64")] == 'w') {
 				/* ia64w: ELF, 64bit */
 				is64bit = true;
+				if (0
+				 /* added by gcc always */
+				 || StringListAppendConcat(sysRunpathList,  STRnLEN("/usr/ccs/lib/hpux64"), NULL) < 0
+				 || StringListAppendConcat(sysRunpathList,  STRnLEN("/lib/hpux64"        ), NULL) < 0
+				 || StringListAppendConcat(sysRunpathList,  STRnLEN("/usr/lib/hpux64"    ), NULL) < 0
+				 || StringListAppendConcat(sysRunpathList,  STRnLEN("/usr/ccs/lib"       ), NULL) < 0
+				  /* added by ld upon "+b :" */
+				 || StringListAppendConcat(autoRunpathList, STRnLEN("/usr/lib/hpux64"    ), NULL) < 0
+				)
+					break;
+			} else {
+				is64bit = false;
+				if (0
+				 /* added by gcc always */
+				 || StringListAppendConcat(sysRunpathList,  STRnLEN("/usr/ccs/lib"   ), NULL) < 0
+				  /* added by ld upon "+b :" */
+				 || StringListAppendConcat(autoRunpathList, STRnLEN("/usr/lib/hpux32"), NULL) < 0
+				)
+					break;
 			}
 		} else
-		if (strncmp(StringGetBuffer(data->in->host.triplet), "hppa64", strlen("hppa64")) == 0) {
+		if (strncmp(argBuffer, "hppa64", strlen("hppa64")) == 0) {
 			/* hppa64: ELF, 64bit */
 			isIA64 = false;
 			is64bit = true;
+			if (0
+			 /* added by gcc always */
+			 || StringListAppendConcat(sysRunpathList,  STRnLEN("/usr/ccs/lib/pa20_64"      ), NULL) < 0
+			 || StringListAppendConcat(sysRunpathList,  STRnLEN("/opt/langtools/lib/pa20_64"), NULL) < 0
+			 || StringListAppendConcat(sysRunpathList,  STRnLEN("/lib/pa20_64"              ), NULL) < 0
+			 || StringListAppendConcat(sysRunpathList,  STRnLEN("/usr/lib/pa20_64"          ), NULL) < 0
+			  /* added by ld among "+b :" */
+			 || StringListAppendConcat(autoRunpathList, STRnLEN("/usr/lib/pa20_64"          ), NULL) < 0
+			 || StringListAppendConcat(autoRunpathList, STRnLEN("/usr/ccs/lib/pa20_64"      ), NULL) < 0
+			)
+				break;
 		} else {
 			/* hppa: SOM, 32bit */
 			isIA64 = false;
 			is64bit = false;
-			if (StringListAppendConcat(sysRunpathList,
-					"/usr/ccs/lib", strlen("/usr/ccs/lib"), NULL) < 0
-			 || StringListAppendConcat(sysRunpathList,
-					"/opt/langtools/lib", strlen("/opt/langtools/lib"), NULL) < 0
+			if (0
+			 /* added by gcc always */
+			 || StringListAppendConcat(sysRunpathList, STRnLEN("/usr/ccs/lib"      ), NULL) < 0
+			 || StringListAppendConcat(sysRunpathList, STRnLEN("/opt/langtools/lib"), NULL) < 0
+			  /* added by ld among "+b :" */
 			)
 				break;
 		}
@@ -182,31 +215,7 @@
 					if (argBufferLength == 1 && argBuffer[0] == ':') {
 						/* "+b:" collects all "-L" paths and LPATH envvar */
 						needLibpathAsRunpath = true;
-						/* TODO: getenv("LPATH") */
-						if (isIA64 && is64bit) {
-							/* ia64w */
-							if (StringListAppendConcat(autoRunpathList,
-									"/usr/lib/hpux64", strlen("/usr/lib/hpux64"),
-							NULL) < 0)
-								break;
-						} else
-						if (isIA64 && !is64bit) {
-							/* ia64 */
-							if (StringListAppendConcat(autoRunpathList,
-									"/usr/lib/hpux32", strlen("/usr/lib/hpux32"),
-							NULL) < 0)
-								break;
-						} else
-						if (is64bit) {
-							/* hppa64 */
-							if (StringListAppendConcat(autoRunpathList,
-									"/usr/lib/pa20_64", strlen("/usr/lib/pa20_64"),
-									"/usr/ccs/lib/pa20_64", strlen("/usr/ccs/lib/pa20_64"),
-							NULL) < 0)
-								break;
-						} else {
-							/* hppa */
-						}
+						needAutoRunpath = true;
 						continue;
 					}
 				}
@@ -380,7 +389,9 @@
 			break;
 
 		/* append automatic sys libpath list to runpath list */
-		if (StringListAppendList(runpathList, autoRunpathList, 0, -1) < 0)
+		if (needAutoRunpath
+		 && StringListAppendList(runpathList, autoRunpathList, 0, -1) < 0
+		)
 			break;
 
 		/* create runpath string: runpath1:runpathN */
@@ -399,7 +410,7 @@
 
 		/* do we need the "+cdp ${D}:" flag? */
 		if (needCDPflag
-		 && (StringListAppendConcat(data->out->argList, "+cdp", strlen("+cdp"), NULL) < 0
+		 && (StringListAppendConcat(data->out->argList, STRnLEN("+cdp"), NULL) < 0
 		  || StringListAppendConcat(data->out->argList, portageD, portageDlength, ":", 1, NULL) < 0
 		))
 			break;



Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in net-misc/wicd: wicd-1.6.2.ebuild ChangeLog wicd-1.6.1.ebuild
Next by thread:
gentoo-x86 commit in dev-java/jung: jung-1.7.6.ebuild
Previous by date:
gentoo-x86 commit in net-misc/wicd: wicd-1.6.2.ebuild ChangeLog wicd-1.6.1.ebuild
Next by date:
gentoo-x86 commit in sys-apps/hal: ChangeLog hal-0.5.12_rc1-r6.ebuild


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.