mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Chin You Wen (WMSC-HW)" <youwen@willowglen.asia>
To: Juergen Borleis <jbe@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Append Make Options to Compile Stage of Rule File
Date: Mon, 18 Feb 2019 18:29:31 +0800	[thread overview]
Message-ID: <CAJ1upxd1RnhFXQkMU9GHfzmVJxR-2o+iNw6JCxxKw8fWfpfXjw@mail.gmail.com> (raw)
In-Reply-To: <201902181056.56824.jbe@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 3372 bytes --]

Hi Jürgen,

I tried that and also with some variations such as "CFLAGS+=-Wno-error" but
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=shadow]
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=shadow]
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 <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 plain
> > Makefiles. I am trying to pass *-Wno-error* option through the
> > <PKG>_MAKE_OPT variable to override the *-Werror *option specified in the
> > package Makefile.
> >
> > I have set
> >  LIBSEPOL_CONF_TOOL      := NO
> >
> > and also
> > LIBSEPOL_MAKE_ENV := $(CROSS_ENV)
> > LIBSEPOL_MAKE_OPT := \
> >                 -Wno-error=shadow
> >
> > The make still runs without the *-Wno-error *option during compilation.
>
> Hmm, the "-Wno-error=shadow" must be forwarded to the compiler. You may
> need
> something like "CFLAGS=-Wno-error=shadow" in your case instead. This
> variable is used in the project's Makefiles (like in src/Makefile, line 50
> for example).
>
> Cheers,
> Jürgen
>
> --
> Pengutronix e.K.                             | Juergen Borleis
> |
> Industrial Linux Solutions                   | http://www.pengutronix.de/
>  |
>


-- 
Regards,
You Wen

[-- Attachment #1.2: Type: text/html, Size: 4476 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2019-02-18 10:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18  9:43 Chin You Wen (WMSC-HW)
2019-02-18  9:56 ` Juergen Borleis
2019-02-18 10:29   ` Chin You Wen (WMSC-HW) [this message]
2019-02-18 10:50     ` Juergen Borleis
2019-02-19  3:14       ` Chin You Wen (WMSC-HW)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ1upxd1RnhFXQkMU9GHfzmVJxR-2o+iNw6JCxxKw8fWfpfXjw@mail.gmail.com \
    --to=youwen@willowglen.asia \
    --cc=jbe@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox