Patchwork [OpenWrt-Devel] Remove fhonour-copts

login
register
Submitter Roberto Riggio
Date 2010-10-05 07:30:07
Message ID <4CAAD3FF.1050005@create-net.org>
Download mbox | patch
Permalink /patch/310/
State Rejected
Headers show

Comments

Roberto Riggio - 2010-10-05 07:30:07
As suggested by Florian, I'm submitting a patch that removes
the honour-copts CFLAG when using an external toolchain.

With the flag I'm getting this error when trying to compile
a package (the click router):

cc1plus: error: unrecognized command line option "-fhonour-copts"

Signed-off-by: Roberto Riggio<roberto.riggio@create-net.org>

--
-I$(TOOLCHAIN_DIR)/include
      TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
      TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
Roberto Riggio - 2010-10-11 11:04:21
Ping...

Il 05/10/2010 09:30, Roberto Riggio ha scritto:
>  As suggested by Florian, I'm submitting a patch that removes
> the honour-copts CFLAG when using an external toolchain.
>
> With the flag I'm getting this error when trying to compile
> a package (the click router):
>
> cc1plus: error: unrecognized command line option "-fhonour-copts"
>
> Signed-off-by: Roberto Riggio<roberto.riggio@create-net.org>
>
> -- 
> Index: rules.mk
> ===================================================================
> --- rules.mk    (revision 23230)
> +++ rules.mk    (working copy)
> @@ -113,7 +113,6 @@
>    ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
>      -include $(TOOLCHAIN_DIR)/info.mk
>      TARGET_CROSS:=$(if 
> $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if 
> $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
> -    TARGET_CFLAGS+= -fhonour-copts
>      TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include 
> -I$(TOOLCHAIN_DIR)/include
>      TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
>      TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Florian Fainelli - 2010-10-11 11:30:45
Hello Roberto,

On Tuesday 05 October 2010 09:30:07 Roberto Riggio wrote:
>   As suggested by Florian, I'm submitting a patch that removes
> the honour-copts CFLAG when using an external toolchain.
> 
> With the flag I'm getting this error when trying to compile
> a package (the click router):
> 
> cc1plus: error: unrecognized command line option "-fhonour-copts"
> 
> Signed-off-by: Roberto Riggio<roberto.riggio@create-net.org>
> 
> --
> Index: rules.mk
> ===================================================================
> --- rules.mk    (revision 23230)
> +++ rules.mk    (working copy)
> @@ -113,7 +113,6 @@
>     ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
>       -include $(TOOLCHAIN_DIR)/info.mk
>       TARGET_CROSS:=$(if
> $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if
> $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
> -    TARGET_CFLAGS+= -fhonour-copts
>       TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include
> -I$(TOOLCHAIN_DIR)/include
>       TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
>       TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)

I just reviewed this part of the patch, and it is enclosed with an
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)

which is evaluated to true, in the case of a non-external toolchain build, so 
your patch also removes -fhonour-opts for non-external toolchain builds, 
unless I got this part wrong?
--
Florian
Roberto Riggio - 2010-10-11 11:52:12
Il 11/10/2010 13:30, Florian Fainelli ha scritto:
> Hello Roberto,
Hi
> I just reviewed this part of the patch, and it is enclosed with an
> ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
>
> which is evaluated to true, in the case of a non-external toolchain build, so
> your patch also removes -fhonour-opts for non-external toolchain builds,
> unless I got this part wrong?
Probably I've misunderstood a suggest of yours in a a previous email.

I'm not using an external toolchain, however I'm getting this error:

cc1plus: error: unrecognized command line option "-fhonour-copts"

when I try to compile a package. The makefile that I'm using is very
lightweight:

EXTRA_CFLAGS=-MD -fno-stack-protector


CONFIGURE_ARGS += \
     --enable-userlevel \
     --enable-wifi \
     --enable-wing \
     --disable-linuxmodule \
     --disable-dynamic-linking \

and then the default compile and configure.

This when building from trunk with either gcc 4.1.2 (the default one) and
4.4.4.
Florian Fainelli - 2010-10-11 11:59:44
Hi,

On Monday 11 October 2010 13:52:12 Roberto Riggio wrote:
>   Il 11/10/2010 13:30, Florian Fainelli ha scritto:
> > Hello Roberto,
> 
> Hi
> 
> > I just reviewed this part of the patch, and it is enclosed with an
> > ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
> > 
> > which is evaluated to true, in the case of a non-external toolchain
> > build, so your patch also removes -fhonour-opts for non-external
> > toolchain builds, unless I got this part wrong?
> 
> Probably I've misunderstood a suggest of yours in a a previous email.

I asked you if you were using an external toolchain and you seem to have said 
yes, I guess both of us misunderstood each other.

> 
> I'm not using an external toolchain, however I'm getting this error:
> 
> cc1plus: error: unrecognized command line option "-fhonour-copts"

Ok, but that means you have patched your toolchain not to include the -
fhonour-opts patch right?

> 
> when I try to compile a package. The makefile that I'm using is very
> lightweight:
> 
> EXTRA_CFLAGS=-MD -fno-stack-protector
> 
> 
> CONFIGURE_ARGS += \
>      --enable-userlevel \
>      --enable-wifi \
>      --enable-wing \
>      --disable-linuxmodule \
>      --disable-dynamic-linking \
> 
> and then the default compile and configure.
> 
> This when building from trunk with either gcc 4.1.2 (the default one) and
> 4.4.4.

Unless this is either the fhonour-copts patch missing in gcc-4.4.4 or, a 
porting bug which prevents its use when -fno-stack-protector, I do not see 
what is wrong.
--
Florian
Stephen Thornton - 2010-10-11 12:34:39
Hi,

Is this perchance related to the problem I mentioned the other day? I cannot get the grub package (stage 2) to build - I get the __stack_chk_fail error, even though -fno-stack-protector is definitely set. I am not using the host toolchain, just the standard, out of the box toolchain built from an OWRT svn checkout (r 23210). I do have a working copy of grub on my host Ubuntu box which I can use, but this is a pain in the butt. The standard Kamikaze 8.09.2 built from the source tarball works just fine however. I get exactly this same problem when I try to build on my iMac (8.09.2 build works fine though). I've spent hours and hours on this one, and am still no nearer understanding what is going on.

best regards

Steve

On 11 Oct 2010, at 12:59, Florian Fainelli wrote:

> Hi,
> 
> On Monday 11 October 2010 13:52:12 Roberto Riggio wrote:
>>  Il 11/10/2010 13:30, Florian Fainelli ha scritto:
>>> Hello Roberto,
>> 
>> Hi
>> 
>>> I just reviewed this part of the patch, and it is enclosed with an
>>> ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
>>> 
>>> which is evaluated to true, in the case of a non-external toolchain
>>> build, so your patch also removes -fhonour-opts for non-external
>>> toolchain builds, unless I got this part wrong?
>> 
>> Probably I've misunderstood a suggest of yours in a a previous email.
> 
> I asked you if you were using an external toolchain and you seem to have said 
> yes, I guess both of us misunderstood each other.
> 
>> 
>> I'm not using an external toolchain, however I'm getting this error:
>> 
>> cc1plus: error: unrecognized command line option "-fhonour-copts"
> 
> Ok, but that means you have patched your toolchain not to include the -
> fhonour-opts patch right?
> 
>> 
>> when I try to compile a package. The makefile that I'm using is very
>> lightweight:
>> 
>> EXTRA_CFLAGS=-MD -fno-stack-protector
>> 
>> 
>> CONFIGURE_ARGS += \
>>     --enable-userlevel \
>>     --enable-wifi \
>>     --enable-wing \
>>     --disable-linuxmodule \
>>     --disable-dynamic-linking \
>> 
>> and then the default compile and configure.
>> 
>> This when building from trunk with either gcc 4.1.2 (the default one) and
>> 4.4.4.
> 
> Unless this is either the fhonour-copts patch missing in gcc-4.4.4 or, a 
> porting bug which prevents its use when -fno-stack-protector, I do not see 
> what is wrong.
> --
> Florian
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Roberto Riggio - 2010-10-11 13:49:53
Il 11/10/2010 13:59, Florian Fainelli ha scritto:
>> I'm not using an external toolchain, however I'm getting this error:
>>
>> cc1plus: error: unrecognized command line option "-fhonour-copts"
> Ok, but that means you have patched your toolchain not to include the -
> fhonour-opts patch right?
No, I haven't patched the toolchain. Where is this patch located?
Is it 910-mbsd_multi.patch? If so the patch is there.
>> when I try to compile a package. The makefile that I'm using is very
>> lightweight:
>>
>> EXTRA_CFLAGS=-MD -fno-stack-protector
>>
>>
>> CONFIGURE_ARGS += \
>>       --enable-userlevel \
>>       --enable-wifi \
>>       --enable-wing \
>>       --disable-linuxmodule \
>>       --disable-dynamic-linking \
>>
>> and then the default compile and configure.
>>
>> This when building from trunk with either gcc 4.1.2 (the default one) and
>> 4.4.4.
> Unless this is either the fhonour-copts patch missing in gcc-4.4.4 or, a
> porting bug which prevents its use when -fno-stack-protector, I do not see
> what is wrong.

I've removed the -fnostack-protector and I'm still getting the same
error (gcc 4.1.2).


> --
> Florian
Roberto Riggio - 2010-10-14 09:48:23
Hi Florian,

sorry it was a problem on my side. The package I'm trying to compile
uses the host environment to compile some execs. The honour-copts
was also passed during this ste.

I've solved the problem by splitting the compilation in host/target. I will
soon post a patch for the package (wing). I'm verifing if everything works
fine on architectures different from x86.

R.

Patch

Index: rules.mk
===================================================================
--- rules.mk    (revision 23230)
+++ rules.mk    (working copy)
@@ -113,7 +113,6 @@ 
    ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
      -include $(TOOLCHAIN_DIR)/info.mk
      TARGET_CROSS:=$(if 
$(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if 
$(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
-    TARGET_CFLAGS+= -fhonour-copts
      TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include