public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, libfortran] Don't define _GNU_SOURCE in AM_CPPFLAGS
@ 2011-04-11 20:35 Janne Blomqvist
  2011-04-12  6:31 ` Ralf Wildenhues
  0 siblings, 1 reply; 3+ messages in thread
From: Janne Blomqvist @ 2011-04-11 20:35 UTC (permalink / raw)
  To: Fortran List, GCC Patches

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

Hi,

the attached patch removes the definition of _GNU_SOURCE from
AM_CPPFLAGS. This is not needed anymore since nowadays we're calling
AC_USE_SYSTEM_EXTENSIONS in configure.ac which causes _GNU_SOURCE to
be defined in config.h.

Regtested on x86_64-unknown-linux-gnu, Ok for trunk?

(I'm not committing this as obvious, though the patch is trivial and
it seems obvious to me, I still wonder if I'm missing something)

2011-04-11  Janne Blomqvist  <jb@gcc.gnu.org>

	* Makefile.am: Remove _GNU_SOURCE from CFLAGS.
	* Makefile.in: Regenerated.


-- 
Janne Blomqvist

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

diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index d1e6d4f..c38e330 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -49,7 +49,7 @@ libgfortranbegin_la_LINK = $(LINK) $(libgfortranbegin_la_LDFLAGS)
 ## use -iquote
 AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \
 	      -I$(srcdir)/$(MULTISRCTOP)../gcc/config $(LIBQUADINCLUDE) \
-	      -I$(MULTIBUILDTOP)../../$(host_subdir)/gcc -D_GNU_SOURCE
+	      -I$(MULTIBUILDTOP)../../$(host_subdir)/gcc
 
 # Fortran rules for complex multiplication and division
 AM_CFLAGS += -fcx-fortran-rules

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

* Re: [Patch, libfortran] Don't define _GNU_SOURCE in AM_CPPFLAGS
  2011-04-11 20:35 [Patch, libfortran] Don't define _GNU_SOURCE in AM_CPPFLAGS Janne Blomqvist
@ 2011-04-12  6:31 ` Ralf Wildenhues
  2011-04-12 18:12   ` Janne Blomqvist
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Wildenhues @ 2011-04-12  6:31 UTC (permalink / raw)
  To: Janne Blomqvist; +Cc: Fortran List, GCC Patches

Hi Janne,

* Janne Blomqvist wrote on Mon, Apr 11, 2011 at 10:34:58PM CEST:
> the attached patch removes the definition of _GNU_SOURCE from
> AM_CPPFLAGS. This is not needed anymore since nowadays we're calling
> AC_USE_SYSTEM_EXTENSIONS in configure.ac which causes _GNU_SOURCE to
> be defined in config.h.
> 
> Regtested on x86_64-unknown-linux-gnu, Ok for trunk?
> 
> (I'm not committing this as obvious, though the patch is trivial and
> it seems obvious to me, I still wonder if I'm missing something)

The patch looks good to me.  From

$ find libgfortran -name \*.c -print \
  | while read f; do grep include.*gfort $f >/dev/null || echo $f; done
./caf/mpi.c
./caf/single.c
./intrinsics/string_intrinsics_inc.c
./intrinsics/erfc_scaled_inc.c
./runtime/select_inc.c
./io/close.c
./io/inquire.c
./io/intrinsics.c
./io/open.c
./io/size_from_kind.c
./io/list_read.c
./io/file_pos.c
./io/write.c
./io/lock.c
./io/unit.c
./io/transfer.c
./io/read.c
./io/transfer128.c
./io/fbuf.c
./io/format.c
./io/unix.c

it wasn't clear whether all source files actually include config.h, but

$ for f in $builddir/$target/libgfortran/.deps/*; do
    grep config\\.h $f >/dev/null || echo $f
  done

confirms it to be the case.  (And anyway that's what you'd fix if not.)

Cheers,
Ralf

> 2011-04-11  Janne Blomqvist  <jb@gcc.gnu.org>
> 
> 	* Makefile.am: Remove _GNU_SOURCE from CFLAGS.
> 	* Makefile.in: Regenerated.

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

* Re: [Patch, libfortran] Don't define _GNU_SOURCE in AM_CPPFLAGS
  2011-04-12  6:31 ` Ralf Wildenhues
@ 2011-04-12 18:12   ` Janne Blomqvist
  0 siblings, 0 replies; 3+ messages in thread
From: Janne Blomqvist @ 2011-04-12 18:12 UTC (permalink / raw)
  To: Ralf Wildenhues, Janne Blomqvist, Fortran List, GCC Patches

On Tue, Apr 12, 2011 at 09:31, Ralf Wildenhues <Ralf.Wildenhues@gmx.de> wrote:
> Hi Janne,
>
> * Janne Blomqvist wrote on Mon, Apr 11, 2011 at 10:34:58PM CEST:
>> the attached patch removes the definition of _GNU_SOURCE from
>> AM_CPPFLAGS. This is not needed anymore since nowadays we're calling
>> AC_USE_SYSTEM_EXTENSIONS in configure.ac which causes _GNU_SOURCE to
>> be defined in config.h.
>>
>> Regtested on x86_64-unknown-linux-gnu, Ok for trunk?
>>
>> (I'm not committing this as obvious, though the patch is trivial and
>> it seems obvious to me, I still wonder if I'm missing something)
>
> The patch looks good to me.  From
>
> $ find libgfortran -name \*.c -print \
>  | while read f; do grep include.*gfort $f >/dev/null || echo $f; done
> ./caf/mpi.c
> ./caf/single.c
> ./intrinsics/string_intrinsics_inc.c
> ./intrinsics/erfc_scaled_inc.c
> ./runtime/select_inc.c
> ./io/close.c
> ./io/inquire.c
> ./io/intrinsics.c
> ./io/open.c
> ./io/size_from_kind.c
> ./io/list_read.c
> ./io/file_pos.c
> ./io/write.c
> ./io/lock.c
> ./io/unit.c
> ./io/transfer.c
> ./io/read.c
> ./io/transfer128.c
> ./io/fbuf.c
> ./io/format.c
> ./io/unix.c
>
> it wasn't clear whether all source files actually include config.h, but
>
> $ for f in $builddir/$target/libgfortran/.deps/*; do
>    grep config\\.h $f >/dev/null || echo $f
>  done
>
> confirms it to be the case.  (And anyway that's what you'd fix if not.)

Thanks for the double-check. With that, I think the patch falls under
the obvious rule; committed as r172330.


-- 
Janne Blomqvist

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

end of thread, other threads:[~2011-04-12 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11 20:35 [Patch, libfortran] Don't define _GNU_SOURCE in AM_CPPFLAGS Janne Blomqvist
2011-04-12  6:31 ` Ralf Wildenhues
2011-04-12 18:12   ` Janne Blomqvist

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).