From 7a8ad10ffdec90e4b285c0aa93dc60ca2534b674 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 24 Dec 2011 02:21:09 +0800 Subject: [PATCH] Define _GNU_SOURCE for all users of syscall lib Move the definition of '_GNU_SOURCE' from 'import-lx_hybrid.mk' to 'import-syscall.mk' because this definition may (potentially) affect all programs that include Linux headers installed on the host - not only hybrid Linux/Genode programs. Fixes #52 --- base-linux/lib/import/import-lx_hybrid.mk | 12 ------------ base-linux/lib/import/import-syscall.mk | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/base-linux/lib/import/import-lx_hybrid.mk b/base-linux/lib/import/import-lx_hybrid.mk index d1608eda77..ac1ff5db88 100644 --- a/base-linux/lib/import/import-lx_hybrid.mk +++ b/base-linux/lib/import/import-lx_hybrid.mk @@ -85,18 +85,6 @@ EXT_OBJECTS += $(shell cc -print-file-name=crtn.o) EXT_OBJECTS += -lgcc -lgcc_s -lsupc++ -lc EXT_OBJECTS += -lpthread -# -# Some header files installed on GNU/Linux test for the GNU compiler. For -# example, 'stdio.h' might complain with the following error otherwise: -# -# /usr/include/stdio.h:432:27: error: expected initializer before ‘throw’ -# /usr/include/stdio.h:488:6: error: expected initializer before ‘throw’ -# -# By manually defining '_GNU_SOURCE', the header files are processed as -# expected. -# -CC_OPT += -D_GNU_SOURCE - USE_HOST_LD_SCRIPT = yes ifeq (x86_64,$(findstring x86_64,$(SPECS))) diff --git a/base-linux/lib/import/import-syscall.mk b/base-linux/lib/import/import-syscall.mk index 4a5584ebfc..3d27ee978b 100644 --- a/base-linux/lib/import/import-syscall.mk +++ b/base-linux/lib/import/import-syscall.mk @@ -4,3 +4,16 @@ HOST_INC_DIR += /usr/include # needed for Ubuntu 11.04 HOST_INC_DIR += /usr/include/i386-linux-gnu HOST_INC_DIR += /usr/include/x86_64-linux-gnu + +# +# Some header files installed on GNU/Linux test for the GNU compiler. For +# example, 'stdio.h' might complain with the following error otherwise: +# +# /usr/include/stdio.h:432:27: error: expected initializer before ‘throw’ +# /usr/include/stdio.h:488:6: error: expected initializer before ‘throw’ +# +# By manually defining '_GNU_SOURCE', the header files are processed as +# expected. +# +CC_OPT += -D_GNU_SOURCE +