Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754175AbcK1Sqw (ORCPT ); Mon, 28 Nov 2016 13:46:52 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34410 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbcK1Sqo (ORCPT ); Mon, 28 Nov 2016 13:46:44 -0500 Date: Tue, 29 Nov 2016 02:46:39 +0800 From: Cheah Kok Cheong To: Michal Marek Cc: yann.morin.1998@free.fr, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Scripts: kconfig: nconf: fix _GNU_SOURCE redefined warning Message-ID: <20161128184639.GB16562@linux-Precision-WorkStation-T5500> References: <1480264106-29881-1-git-send-email-thrust73@gmail.com> <5d8cb4b1-fe87-5daf-432b-d6612196a9fc@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5d8cb4b1-fe87-5daf-432b-d6612196a9fc@suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uASIkum1027947 Content-Length: 6913 Lines: 64 Did not add anything. I append output of "make nconfig --trace" and "gcc -v" below. The -D_GNU_SOURCE flag appeared as it goes into scripts/kconfig. See whether you can spot anything else. Sorry for the unwrapped output. Thanks, CheahKC $ make nconfig --trace Makefile:447: target 'scripts_basic' does not exist make -f ./scripts/Makefile.build obj=scripts/basic scripts/Makefile.host:107: update target 'scripts/basic/fixdep' due to: FORCE set -e; echo ' HOSTCC scripts/basic/fixdep'; gcc -Wp,-MD,scripts/basic/.fixdep.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -o scripts/basic/fixdep scripts/basic/fixdep.c ; scripts/basic/fixdep scripts/basic/.fixdep.d scripts/basic/fixdep 'gcc -Wp,-MD,scripts/basic/.fixdep.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -o scripts/basic/fixdep scripts/basic/fixdep.c ' > scripts/basic/.fixdep.tmp; rm -f scripts/basic/.fixdep.d; mv -f scripts/basic/.fixdep.tmp scripts/basic/.fixdep.cmd; HOSTCC scripts/basic/fixdep scripts/Makefile.build:98: update target '__build' due to: scripts/basic/fixdep : rm -f .tmp_quiet_recordmcount Makefile:545: update target 'nconfig' due to: scripts_basic outputmakefile FORCE make -f ./scripts/Makefile.build obj=scripts/kconfig nconfig scripts/Makefile.host:124: update target 'scripts/kconfig/nconf.o' due to: scripts/kconfig/nconf.c FORCE set -e; echo ' HOSTCC scripts/kconfig/nconf.o'; gcc -Wp,-MD,scripts/kconfig/.nconf.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -D_GNU_SOURCE -DCURSES_LOC="" -DLOCALE -c -o scripts/kconfig/nconf.o scripts/kconfig/nconf.c; scripts/basic/fixdep scripts/kconfig/.nconf.o.d scripts/kconfig/nconf.o 'gcc -Wp,-MD,scripts/kconfig/.nconf.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -D_GNU_SOURCE -DCURSES_LOC="" -DLOCALE -c -o scripts/kconfig/nconf.o scripts/kconfig/nconf.c' > scripts/kconfig/.nconf.o.tmp; rm -f scripts/kconfig/.nconf.o.d; mv -f scripts/kconfig/.nconf.o.tmp scripts/kconfig/.nconf.o.cmd; HOSTCC scripts/kconfig/nconf.o scripts/kconfig/nconf.c:8:0: warning: "_GNU_SOURCE" redefined #define _GNU_SOURCE ^ :0:0: note: this is the location of the previous definition scripts/Makefile.host:124: update target 'scripts/kconfig/zconf.tab.o' due to: scripts/kconfig/zconf.tab.c FORCE scripts/kconfig/zconf.lex.c scripts/kconfig/zconf.hash.c set -e; echo ' HOSTCC scripts/kconfig/zconf.tab.o'; gcc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -D_GNU_SOURCE -DCURSES_LOC="" -DLOCALE -Iscripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c; scripts/basic/fixdep scripts/kconfig/.zconf.tab.o.d scripts/kconfig/zconf.tab.o 'gcc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -D_GNU_SOURCE -DCURSES_LOC="" -DLOCALE -Iscripts/kconfig -c -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c' > scripts/kconfig/.zconf.tab.o.tmp; rm -f scripts/kconfig/.zconf.tab.o.d; mv -f scripts/kconfig/.zconf.tab.o.tmp scripts/kconfig/.zconf.tab.o.cmd; HOSTCC scripts/kconfig/zconf.tab.o scripts/Makefile.host:124: update target 'scripts/kconfig/nconf.gui.o' due to: scripts/kconfig/nconf.gui.c FORCE set -e; echo ' HOSTCC scripts/kconfig/nconf.gui.o'; gcc -Wp,-MD,scripts/kconfig/.nconf.gui.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -D_GNU_SOURCE -DCURSES_LOC="" -DLOCALE -c -o scripts/kconfig/nconf.gui.o scripts/kconfig/nconf.gui.c; scripts/basic/fixdep scripts/kconfig/.nconf.gui.o.d scripts/kconfig/nconf.gui.o 'gcc -Wp,-MD,scripts/kconfig/.nconf.gui.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -D_GNU_SOURCE -DCURSES_LOC="" -DLOCALE -c -o scripts/kconfig/nconf.gui.o scripts/kconfig/nconf.gui.c' > scripts/kconfig/.nconf.gui.o.tmp; rm -f scripts/kconfig/.nconf.gui.o.d; mv -f scripts/kconfig/.nconf.gui.o.tmp scripts/kconfig/.nconf.gui.o.cmd; HOSTCC scripts/kconfig/nconf.gui.o scripts/Makefile.host:116: update target 'scripts/kconfig/nconf' due to: FORCE scripts/kconfig/nconf.o scripts/kconfig/zconf.tab.o scripts/kconfig/nconf.gui.o set -e; echo ' HOSTLD scripts/kconfig/nconf'; gcc -o scripts/kconfig/nconf scripts/kconfig/nconf.o scripts/kconfig/zconf.tab.o scripts/kconfig/nconf.gui.o -lmenu -lpanel -lncurses -ltinfo; printf '%s\n' 'cmd_scripts/kconfig/nconf := gcc -o scripts/kconfig/nconf scripts/kconfig/nconf.o scripts/kconfig/zconf.tab.o scripts/kconfig/nconf.gui.o -lmenu -lpanel -lncurses -ltinfo' > scripts/kconfig/.nconf.cmd HOSTLD scripts/kconfig/nconf scripts/kconfig/Makefile:34: update target 'nconfig' due to: scripts/kconfig/nconf scripts/kconfig/nconf Kconfig $ $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) $ On Mon, Nov 28, 2016 at 11:39:01AM +0100, Michal Marek wrote: > Dne 27.11.2016 v 17:28 Cheah Kok Cheong napsal(a): > > Fix below warning when make nconfig is run initially > > or after make clean. > > > > HOSTCC scripts/kconfig/nconf.o > > scripts/kconfig/nconf.c:8:0: warning: "_GNU_SOURCE" redefined > > #define _GNU_SOURCE > > ^ > > :0:0: note: this is the location of the previous definition > > The Makefile does not specify -D_GNU_SOURCE. Are you adding it manually? > > Thanks, > Michal