* [Buildroot] Change CFLAGS for a certain package
@ 2017-09-21 6:22 mikmik
2017-09-21 21:05 ` Arnout Vandecappelle
0 siblings, 1 reply; 2+ messages in thread
From: mikmik @ 2017-09-21 6:22 UTC (permalink / raw)
To: buildroot
I have a generic-package 'hello' contains hello.c and Makefile.
In the mk file I want to build HELLO_CONFIGURE_OPTS just as
TARGET_CONFIGURE_OPTS but change only CFLAGS to my desired CFLAGS for hello
(say just '-g').
Right now, I used sed on TARGET_CONFIGURE_OPTS and replaced CFLAGS. It
works.
But there isn't a more easy or intuitive way to replace some variables on
TARGET_CONFIGURE_OPTS?
Thanks in advance.
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] Change CFLAGS for a certain package
2017-09-21 6:22 [Buildroot] Change CFLAGS for a certain package mikmik
@ 2017-09-21 21:05 ` Arnout Vandecappelle
0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2017-09-21 21:05 UTC (permalink / raw)
To: buildroot
On 21-09-17 08:22, mikmik wrote:
> I have a generic-package 'hello' contains hello.c and Makefile.
> In the mk file I want to build HELLO_CONFIGURE_OPTS just as
> TARGET_CONFIGURE_OPTS but change only CFLAGS to my desired CFLAGS for hello
> (say just '-g').
>
> Right now, I used sed on TARGET_CONFIGURE_OPTS and replaced CFLAGS. It
> works.
> But there isn't a more easy or intuitive way to replace some variables on
> TARGET_CONFIGURE_OPTS?
For almost all options, you can just override them by specifying the additional
option later. For example, if CFLAGS contains "-g -g0" then you don't get
debugging info. So, you can always just append to cflags:
HELLO_CONFIGURE_OPTS += CFLAGS="$(TARGET_CFLAGS) -g"
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-21 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 6:22 [Buildroot] Change CFLAGS for a certain package mikmik
2017-09-21 21:05 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox