From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gvgBC-0004Ac-Fl for ptxdist@pengutronix.de; Mon, 18 Feb 2019 11:29:42 +0100 Received: by mail-ot1-x333.google.com with SMTP id n71so27387500ota.10 for ; Mon, 18 Feb 2019 02:29:42 -0800 (PST) MIME-Version: 1.0 References: <201902181056.56824.jbe@pengutronix.de> In-Reply-To: <201902181056.56824.jbe@pengutronix.de> From: "Chin You Wen (WMSC-HW)" Date: Mon, 18 Feb 2019 18:29:31 +0800 Message-ID: Subject: Re: [ptxdist] Append Make Options to Compile Stage of Rule File List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1934266298==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: Juergen Borleis Cc: ptxdist@pengutronix.de --===============1934266298== Content-Type: multipart/alternative; boundary="0000000000003269340582289a0f" --0000000000003269340582289a0f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi J=C3=BCrgen, I tried that and also with some variations such as "CFLAGS+=3D-Wno-error" b= ut nothing changes in the compiler output. I am compiling for Phycore-AM335x SOM, if that matters. make[1]: Entering directory `/export/home/oyouwen/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/build= -target/libsepol_2.8' make -C src make[2]: Entering directory `/export/home/oyouwen/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/build= -target/libsepol_2.8/src' cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o assertion.o assertion.c cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o avrule_block.o avrule_block.c cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o avtab.o avtab.c cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o boolean_record.o boolean_record.c cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o booleans.o booleans.c ... cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o interfaces.o interfaces.c cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o kernel_to_cil.o kernel_to_cil.c cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o kernel_to_common.o kernel_to_common.c kernel_to_common.c: In function 'strs_add_at_index': kernel_to_common.c:212:60: error: declaration of 'index' shadows a global declaration [-Werror=3Dshadow] kernel_to_common.c: In function 'strs_read_at_index': kernel_to_common.c:237:54: error: declaration of 'index' shadows a global declaration [-Werror=3Dshadow] cc1: all warnings being treated as errors make[2]: *** [kernel_to_common.o] Error 1 make[2]: *** Waiting for unfinished jobs.... Regards, You Wen On Mon, Feb 18, 2019 at 5:56 PM Juergen Borleis wrote: > Hi You Wen, > > On Monday 18 February 2019 10:43:59 Chin You Wen (WMSC-HW) wrote: > > I am writing a rule to compile the libsepol package that comes with pla= in > > Makefiles. I am trying to pass *-Wno-error* option through the > > _MAKE_OPT variable to override the *-Werror *option specified in t= he > > package Makefile. > > > > I have set > > LIBSEPOL_CONF_TOOL :=3D NO > > > > and also > > LIBSEPOL_MAKE_ENV :=3D $(CROSS_ENV) > > LIBSEPOL_MAKE_OPT :=3D \ > > -Wno-error=3Dshadow > > > > The make still runs without the *-Wno-error *option during compilation. > > Hmm, the "-Wno-error=3Dshadow" must be forwarded to the compiler. You may > need > something like "CFLAGS=3D-Wno-error=3Dshadow" in your case instead. This > variable is used in the project's Makefiles (like in src/Makefile, line 5= 0 > for example). > > Cheers, > J=C3=BCrgen > > -- > Pengutronix e.K. | Juergen Borleis > | > Industrial Linux Solutions | http://www.pengutronix.de/ > | > --=20 Regards, You Wen --0000000000003269340582289a0f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2= =A0J=C3=BCrgen,

I tried that and also with some variatio= ns such as "CFLAGS+=3D-Wno-error" but nothing changes in the comp= iler output. I am compiling for Phycore-AM335x SOM, if that matters.
<= div>

make[1]: Entering directory `/export= /home/oyouwen/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/build-target/= libsepol_2.8'
make -C src
make[2]: Entering directo= ry `/export/home/oyouwen/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/bu= ild-target/libsepol_2.8/src'
cc -Werror -Wall -W -Wundef -Wsh= adow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil= /include -fPIC -c -o assertion.o assertion.c
cc -Werror -Wall -W = -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOU= RCE -I../cil/include -fPIC -c -o avrule_block.o avrule_block.c
cc= -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../= include -D_GNU_SOURCE -I../cil/include -fPIC -c -o avtab.o avtab.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -= I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o boolean_record.o boo= lean_record.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-form= at-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -= o booleans.o booleans.c

...

cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribu= te -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o interfac= es.o interfaces.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-= format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC = -c -o kernel_to_cil.o kernel_to_cil.c
cc -Werror -Wall -W -Wundef= -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I.= ./cil/include -fPIC -c -o kernel_to_common.o kernel_to_common.c
k= ernel_to_common.c: In function 'strs_add_at_index':
kerne= l_to_common.c:212:60: error: declaration of 'index' shadows a globa= l declaration [-Werror=3Dshadow]
kernel_to_common.c: In function = 'strs_read_at_index':
kernel_to_common.c:237:54: error: d= eclaration of 'index' shadows a global declaration [-Werror=3Dshado= w]
cc1: all warnings being treated as errors
make[2]: *= ** [kernel_to_common.o] Error 1
make[2]: *** Waiting for unfinish= ed jobs....


Regards,
You Wen


On Mon, Feb 18, 2019 at 5:5= 6 PM Juergen Borleis <jbe@pengutronix.de> wrote:
Hi You Wen,

On Monday 18 February 2019 10:43:59 Chin You Wen (WMSC-HW) wrote:
> I am writing a rule to compile the libsepol package that comes with pl= ain
> Makefiles. I am trying to pass *-Wno-error* option through the
> <PKG>_MAKE_OPT variable to override the *-Werror *option specifi= ed in the
> package Makefile.
>
> I have set
>=C2=A0 LIBSEPOL_CONF_TOOL=C2=A0 =C2=A0 =C2=A0 :=3D NO
>
> and also
> LIBSEPOL_MAKE_ENV :=3D $(CROSS_ENV)
> LIBSEPOL_MAKE_OPT :=3D \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-Wno-erro= r=3Dshadow
>
> The make still runs without the *-Wno-error *option during compilation= .

Hmm, the "-Wno-error=3Dshadow" must be forwarded to the compiler.= You may need
something like "CFLAGS=3D-Wno-error=3Dshadow" in your case instea= d. This
variable is used in the project's Makefiles (like in src/Makefile, line= 50
for example).

Cheers,
J=C3=BCrgen

--
Pengutronix e.K. =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0| Juergen Borleis =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |
Industrial Linux Solutions =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0=C2=A0 =C2=A0| http://www.pengutronix.de/ =C2=A0|


--
Regards,
You Wen
--0000000000003269340582289a0f-- --===============1934266298== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --===============1934266298==--