Hi, Dash currently sets EXTRA_KLIBCCFLAGS, so if you set it to something else, it fails to build. Not sure if the following is correct, but it seems to work. diff --git a/usr/dash/Kbuild b/usr/dash/Kbuild index 8e5184e..6e743f8 100644 --- a/usr/dash/Kbuild +++ b/usr/dash/Kbuild @@ -18,7 +18,7 @@ DEFAULT_INCLUDES := \ -I$(srctree)/$(src) -I$(objtree)/$(obj) \ -include $(srctree)/$(src)/config.h -EXTRA_KLIBCCFLAGS := $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) +KLIBCCFLAGS += $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) HOST_EXTRACFLAGS := $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) SRCS := alias.c arith_yylex.c cd.c error.c eval.c exec.c expand.c \ -- Martin Schlemmer -------------- next part -------------- A non-text attachment was scrubbed... Name: klibc-1.4.8-dash-flags.patch Type: text/x-patch Size: 530 bytes Desc: not available Url : http://www.zytor.com/pipermail/klibc/attachments/20060708/e85dee17/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://www.zytor.com/pipermail/klibc/attachments/20060708/e85dee17/attachment-0001.bin
On Sat, Jul 08, 2006 at 05:19:52PM +0200, Martin Schlemmer wrote:> Hi, > > Dash currently sets EXTRA_KLIBCCFLAGS, so if you set it to something > else, it fails to build. Not sure if the following is correct, but it > seems to work. > > > diff --git a/usr/dash/Kbuild b/usr/dash/Kbuild > index 8e5184e..6e743f8 100644 > --- a/usr/dash/Kbuild > +++ b/usr/dash/Kbuild > @@ -18,7 +18,7 @@ DEFAULT_INCLUDES := \ > -I$(srctree)/$(src) -I$(objtree)/$(obj) \ > -include $(srctree)/$(src)/config.h > > -EXTRA_KLIBCCFLAGS := $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) > +KLIBCCFLAGS += $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) > HOST_EXTRACFLAGS := $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)This is bogus. KLIBCCFLAGS is a internal thing that users shall not fool with. EXTRA_KLIBCCFLAGS is exactly used for this purpose. And if it does not work then we shall fix kbuild - we shall not circumvent it. Sam
On Sat, 2006-07-08 at 23:07 +0200, Sam Ravnborg wrote:> On Sat, Jul 08, 2006 at 05:19:52PM +0200, Martin Schlemmer wrote: > > Hi, > > > > Dash currently sets EXTRA_KLIBCCFLAGS, so if you set it to something > > else, it fails to build. Not sure if the following is correct, but it > > seems to work. > > > > > > diff --git a/usr/dash/Kbuild b/usr/dash/Kbuild > > index 8e5184e..6e743f8 100644 > > --- a/usr/dash/Kbuild > > +++ b/usr/dash/Kbuild > > @@ -18,7 +18,7 @@ DEFAULT_INCLUDES := \ > > -I$(srctree)/$(src) -I$(objtree)/$(obj) \ > > -include $(srctree)/$(src)/config.h > > > > -EXTRA_KLIBCCFLAGS := $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) > > +KLIBCCFLAGS += $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) > > HOST_EXTRACFLAGS := $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) > > This is bogus. KLIBCCFLAGS is a internal thing that users shall not fool > with. > EXTRA_KLIBCCFLAGS is exactly used for this purpose. And if it does not > work then we shall fix kbuild - we shall not circumvent it. >Hmm, ok. Recommended way to set extra flags at build time then? Or not supported ? -- Martin Schlemmer -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://www.zytor.com/pipermail/klibc/attachments/20060708/f2db2b34/attachment.bin
On Sat, Jul 08, 2006 at 11:23:53PM +0200, Martin Schlemmer wrote:> > EXTRA_KLIBCCFLAGS is exactly used for this purpose. And if it does not > > work then we shall fix kbuild - we shall not circumvent it. > > > > Hmm, ok. Recommended way to set extra flags at build time then? Or not > supported ?Thats the sole purpose of EXTRA_KLIBCCFLAGS. What is it yout patch try to fix? If I append -Dviggo=1 to EXTRA_KLIBCCFLAGS in dash/Kbuild then this option is used for gcc. Sam
On Sat, 2006-07-08 at 23:35 +0200, Sam Ravnborg wrote:> On Sat, Jul 08, 2006 at 11:23:53PM +0200, Martin Schlemmer wrote: > > > EXTRA_KLIBCCFLAGS is exactly used for this purpose. And if it does not > > > work then we shall fix kbuild - we shall not circumvent it. > > > > > > > Hmm, ok. Recommended way to set extra flags at build time then? Or not > > supported ? > Thats the sole purpose of EXTRA_KLIBCCFLAGS. > What is it yout patch try to fix? > > If I append -Dviggo=1 to EXTRA_KLIBCCFLAGS in dash/Kbuild then this > option is used for gcc. >Well, if I do: $ make EXTRA_KLIBCCFLAGS="-Wa,--noexecstack" for example, dash fails to build as EXTRA_KLIBCCFLAGS gets replaced. So either we misunderstood each other, and I am after all not allowed to do that, or this might be a better patch: -- diff --git a/usr/dash/Kbuild b/usr/dash/Kbuild index 8e5184e..7e273e8 100644 --- a/usr/dash/Kbuild +++ b/usr/dash/Kbuild @@ -18,7 +18,7 @@ DEFAULT_INCLUDES := \ -I$(srctree)/$(src) -I$(objtree)/$(obj) \ -include $(srctree)/$(src)/config.h -EXTRA_KLIBCCFLAGS := $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) +EXTRA_KLIBCCFLAGS += $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) HOST_EXTRACFLAGS := $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) SRCS := alias.c arith_yylex.c cd.c error.c eval.c exec.c expand.c \ -- Martin Schlemmer -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://www.zytor.com/pipermail/klibc/attachments/20060708/ec981ac1/attachment.bin