public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH
@ 2017-11-21  7:41 Ian Lance Taylor
  2017-11-21 20:04 ` Eric Botcazou
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Lance Taylor @ 2017-11-21  7:41 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

This patch by Than McIntosh fixes a small bug in the libgo Makefile
recipe that constructs the directory from which to pick up
libgcc_s.so; the gccgo invocation with -print-libgcc-file-name was
missing the flags, which meant that for -m32 builds we'd see the
64-bit libgcc dir.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1001 bytes --]

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 254983)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-5485b3faed476f6d051833d1790b5f77be9d1efc
+fecb92bda0aa6d70c89d14635ff568df77d2bb5f
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/Makefile.am
===================================================================
--- libgo/Makefile.am	(revision 254729)
+++ libgo/Makefile.am	(working copy)
@@ -1001,7 +1001,7 @@ CHECK = \
 	export MAKE; \
 	NM="$(NM)"; \
 	export NM; \
-	libgccdir=`${GOC} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
+	libgccdir=`${GOC} ${GOCFLAGS} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
 	LD_LIBRARY_PATH="`${PWD_COMMAND}`/.libs:$${libgccdir}:${LD_LIBRARY_PATH}"; \
 	LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
 	export LD_LIBRARY_PATH; \

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH
  2017-11-21  7:41 libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH Ian Lance Taylor
@ 2017-11-21 20:04 ` Eric Botcazou
  2017-11-22  4:41   ` Ian Lance Taylor
  2017-11-22  8:09   ` Bernhard Reutner-Fischer
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Botcazou @ 2017-11-21 20:04 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]

> This patch by Than McIntosh fixes a small bug in the libgo Makefile
> recipe that constructs the directory from which to pick up
> libgcc_s.so; the gccgo invocation with -print-libgcc-file-name was
> missing the flags, which meant that for -m32 builds we'd see the
> 64-bit libgcc dir.  Bootstrapped and ran Go testsuite on
> x86_64-pc-linux-gnu.  Committed to mainline.

Thanks, this helps on Solaris.  I have attached another fixlet: the -q option 
of grep is rejected on Solaris.  Tested on Linux and Solaris.

-- 
Eric Botcazou

[-- Attachment #2: libgo.diff --]
[-- Type: text/x-patch, Size: 661 bytes --]

Index: mksigtab.sh
===================================================================
--- mksigtab.sh	(revision 255000)
+++ mksigtab.sh	(working copy)
@@ -29,7 +29,7 @@ addsig() {
     echo "	$1: $2,"
     # Get the signal number and add it to SIGLIST
     signum=`grep "const $1 = " gen-sysinfo.go | sed -e 's/.* = //'`
-    if echo "$signum" | grep -q '^_SIG[A-Z0-9_]*$'; then
+    if echo "$signum" | grep '^_SIG[A-Z0-9_]*$' >/dev/null 2>&1; then
         # Recurse once to obtain signal number
         # This is needed for some MIPS signals defined as aliases of other signals
         signum=`grep "const $signum = " gen-sysinfo.go | sed -e 's/.* = //'`

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH
  2017-11-21 20:04 ` Eric Botcazou
@ 2017-11-22  4:41   ` Ian Lance Taylor
  2017-11-22  8:09   ` Bernhard Reutner-Fischer
  1 sibling, 0 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2017-11-22  4:41 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc-patches, gofrontend-dev

On Tue, Nov 21, 2017 at 11:53 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> This patch by Than McIntosh fixes a small bug in the libgo Makefile
>> recipe that constructs the directory from which to pick up
>> libgcc_s.so; the gccgo invocation with -print-libgcc-file-name was
>> missing the flags, which meant that for -m32 builds we'd see the
>> 64-bit libgcc dir.  Bootstrapped and ran Go testsuite on
>> x86_64-pc-linux-gnu.  Committed to mainline.
>
> Thanks, this helps on Solaris.  I have attached another fixlet: the -q option
> of grep is rejected on Solaris.  Tested on Linux and Solaris.

Thanks.  Committed.

Ian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH
  2017-11-21 20:04 ` Eric Botcazou
  2017-11-22  4:41   ` Ian Lance Taylor
@ 2017-11-22  8:09   ` Bernhard Reutner-Fischer
  2017-11-22  8:14     ` Eric Botcazou
  1 sibling, 1 reply; 7+ messages in thread
From: Bernhard Reutner-Fischer @ 2017-11-22  8:09 UTC (permalink / raw)
  To: gcc-patches, Eric Botcazou, Ian Lance Taylor; +Cc: gofrontend-dev

On 21 November 2017 20:53:50 CET, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> This patch by Than McIntosh fixes a small bug in the libgo Makefile
>> recipe that constructs the directory from which to pick up
>> libgcc_s.so; the gccgo invocation with -print-libgcc-file-name was
>> missing the flags, which meant that for -m32 builds we'd see the
>> 64-bit libgcc dir.  Bootstrapped and ran Go testsuite on
>> x86_64-pc-linux-gnu.  Committed to mainline.
>
>Thanks, this helps on Solaris.  I have attached another fixlet: the -q
>option 
>of grep is rejected on Solaris.  Tested on Linux and Solaris.

How can that be?
grep -q was even required by SUSv2 from 1997 so Solaris should really support it.
What version if Solaris is that and what version of grep?

thanks, 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH
  2017-11-22  8:09   ` Bernhard Reutner-Fischer
@ 2017-11-22  8:14     ` Eric Botcazou
  2017-11-22  8:39       ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Botcazou @ 2017-11-22  8:14 UTC (permalink / raw)
  To: Bernhard Reutner-Fischer; +Cc: gcc-patches, Ian Lance Taylor, gofrontend-dev

> grep -q was even required by SUSv2 from 1997 so Solaris should really
> support it. What version if Solaris is that and what version of grep?

/usr/bin/grep on Solaris 10 (/usr/xpg4/bin/grep does support it).

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH
  2017-11-22  8:14     ` Eric Botcazou
@ 2017-11-22  8:39       ` Bernhard Reutner-Fischer
  2017-11-22 10:27         ` Eric Botcazou
  0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Reutner-Fischer @ 2017-11-22  8:39 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: GCC Patches, Ian Lance Taylor, gofrontend-dev

On 22 November 2017 at 09:07, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> grep -q was even required by SUSv2 from 1997 so Solaris should really
>> support it. What version if Solaris is that and what version of grep?
>
> /usr/bin/grep on Solaris 10 (/usr/xpg4/bin/grep does support it).

Why would we want to use /usr/bin ?
According to https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html
---8<---
Utilities

If the behavior required by POSIX.2, POSIX.2a, XPG4, SUS, or SUSv2
conflicts with historical Solaris utility behavior, the original
Solaris version of the utility is unchanged; a new version that is
standard-conforming has been provided in /usr/xpg4/bin. If the
behavior required by POSIX.1–2001 or SUSv3 conflicts with historical
Solaris utility behavior, a new version that is standard-conforming
has been provided in /usr/xpg4/bin or in /usr/xpg6/bin. If the
behavior required by POSIX.1–2001 or SUSv3 conflicts with POSIX.2,
POSIX.2a, SUS, or SUSv2, a new version that is SUSv3
standard-conforming has been provided in /usr/xpg6/bin.
---8<---

So we should obviously make sure to prefer /usr/xpg6/bin over
/usr/xpg4/bin over /usr/bin.
If we don't then i would say that's the bug to fix, not warp back in
time 20 years. Why let solaris hold hostage everybody else?

thanks,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH
  2017-11-22  8:39       ` Bernhard Reutner-Fischer
@ 2017-11-22 10:27         ` Eric Botcazou
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Botcazou @ 2017-11-22 10:27 UTC (permalink / raw)
  To: Bernhard Reutner-Fischer; +Cc: gcc-patches, Ian Lance Taylor, gofrontend-dev

> If we don't then i would say that's the bug to fix, not warp back in
> time 20 years. Why let solaris hold hostage everybody else?

Let's not start a flame war, please.  Almost all other uses of grep in the 
libgo directory have >/dev/null instead of -q and nobody chokes on them.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-22 10:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21  7:41 libgo patch committed: Fix Makefile bug setting LD_LIBRARY_PATH Ian Lance Taylor
2017-11-21 20:04 ` Eric Botcazou
2017-11-22  4:41   ` Ian Lance Taylor
2017-11-22  8:09   ` Bernhard Reutner-Fischer
2017-11-22  8:14     ` Eric Botcazou
2017-11-22  8:39       ` Bernhard Reutner-Fischer
2017-11-22 10:27         ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).