pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/52390: current fails to bootstrap on CentOS 6



On 07/17/17 05:14, Joerg Sonnenberger wrote:
On Sun, Jul 16, 2017 at 05:30:00PM +0000, Jason Bacon wrote:
The following reply was made to PR pkg/52390; it has been noted by GNATS.

From: Jason Bacon <bacon4000%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost, pkg-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
  pkgsrc-bugs%netbsd.org@localhost
Cc:
Subject: Re: pkg/52390: current fails to bootstrap on CentOS 6
Date: Sun, 16 Jul 2017 12:29:20 -0500

  On 07/16/17 11:55, coypu%sdf.org@localhost wrote:
  > The following reply was made to PR pkg/52390; it has been noted by GNATS.
  >
  > From: coypu%sdf.org@localhost
  > To: gnats-bugs%NetBSD.org@localhost
  > Cc:
  > Subject: Re: pkg/52390: current fails to bootstrap on CentOS 6
  > Date: Sun, 16 Jul 2017 16:52:25 +0000
  >
  >   Please try the following, thanks
  >
  >   Index: Makefile
  >   ===================================================================
  >   RCS file: /cvsroot/pkgsrc/pkgtools/cwrappers/files/bin/Makefile,v
  >   retrieving revision 1.5
  >   diff -u -r1.5 Makefile
  >   --- Makefile	9 Dec 2016 22:25:28 -0000	1.5
  >   +++ Makefile	16 Jul 2017 16:52:08 -0000
  >   @@ -32,6 +32,10 @@
  >    WARNS=	4
  >    NOMAN=
  >
  >   +.if ${OPSYS} == "Linux"
  >   +CFLAGS+=	-Wno-error=unused-result
  >   +.endif
  >   +
  >    CLEANFILES+=	.work-new.log \
  >    		transform-gcc-rules-fixed.map \
  >    		transform-gcc-rules-fixed1.c \
  >
Unfortunately, that flag is not present in GCC 4.4.7: Linux sciprog2.ceas bacon ~ 405: (pkgsrc): gcc -Wno-error=unused-result
  junk.c
  cc1: error: -Werror=unused-result: No option -Wunused-result
Linux sciprog2.ceas bacon ~ 408: (pkgsrc):
  Pkgsrc/pkg-2017Q1/gcc49/bin/gcc -Wno-error=unused-result junk.c
  Linux sciprog2.ceas bacon ~ 409: (pkgsrc):
It would have been a nice solution...
-Wno-unused-result, not -Wno-error=unused-result.

Joerg

Also not supported in 4.4.7.

I had searched the GCC man page for "unused-result" and came up empty. I just tried it anyway:

Linux sciprog2.ceas bacon ~ 429: (pkgsrc): gcc -O2 -Wno-unused-result -D_FORTIFY_SOURCE=2 -Werror warn.c
cc1: warnings being treated as errors
warn.c: In function ‘main’:
warn.c:9: error: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
At top level:
cc1: error: unrecognized command line option "-Wno-unused-result"

It is documented and functional in GCC 4.8 and later:

Linux sciprog2.ceas bacon ~ 436: (pkgsrc): Pkgsrc/pkg-2017Q1/gcc48/bin/gcc -O2 -Wno-unused-result -D_FORTIFY_SOURCE=1 -Werror warn.c
Linux sciprog2.ceas bacon ~ 437: (pkgsrc):

Interestingly, on CentOS at least, without _FORTIFY_SOURCE, the flag seems to be silently ignored:

Linux sciprog2.ceas bacon ~ 438: (pkgsrc): gcc -O2 -Wno-unused-result -Werror warn.c
Linux sciprog2.ceas bacon ~ 439: (pkgsrc):

Thanks anyway,

    JB

--
Earth is a beta site.


Home | Main Index | Thread Index | Old Index