All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] buildroot: gcc options
@ 2013-11-15  9:03 Altunbas Sabri
  2013-11-15  9:13 ` Thomas De Schampheleire
  0 siblings, 1 reply; 15+ messages in thread
From: Altunbas Sabri @ 2013-11-15  9:03 UTC (permalink / raw)
  To: buildroot



Hi together,

how can i pass gcc-options "-mfmovd -mdalign" to buildroot which I configured with "external toolchain"

Regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131115/f5197361/attachment.html>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15  9:03 [Buildroot] buildroot: gcc options Altunbas Sabri
@ 2013-11-15  9:13 ` Thomas De Schampheleire
  2013-11-15  9:38   ` Altunbas Sabri
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15  9:13 UTC (permalink / raw)
  To: buildroot

Hi,

On Fri, Nov 15, 2013 at 10:03 AM, Altunbas Sabri (DC-IA/EAH2)
<sabri.altunbas@boschrexroth.de> wrote:
>
>
> Hi together,
>
> how can i pass gcc-options ?-mfmovd -mdalign? to buildroot which I
> configured with ?external toolchain?
>

You can use the option BR2_TARGET_OPTIMIZATION for that...

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15  9:13 ` Thomas De Schampheleire
@ 2013-11-15  9:38   ` Altunbas Sabri
  2013-11-15  9:41     ` Thomas De Schampheleire
  0 siblings, 1 reply; 15+ messages in thread
From: Altunbas Sabri @ 2013-11-15  9:38 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

I defined 

....
BR2_TARGET_OPTIMIZATION="-pipe -mfmovd -mdalign"
.....

But I get following errors

....
....
editors/awk.c: In function 'my_strtod':
editors/awk.c:746:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://support.codesourcery.com/GNUToolchain/> for instructions.
make[2]: *** [editors/awk.o] Error 1
make[1]: *** [editors] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC      coreutils/hostid.o
  CC      coreutils/id.o
  CC      coreutils/install.o
  CC      coreutils/ln.o
  CC      coreutils/logname.o
  CC      coreutils/ls.o
  CC      coreutils/md5_sha1_sum.o
  CC      coreutils/mkdir.o
  CC      coreutils/mkfifo.o
  CC      coreutils/mknod.o
  CC      coreutils/mv.o
  CC      coreutils/nice.o
  CC      coreutils/nohup.o
  CC      coreutils/od.o
  CC      coreutils/printenv.o
  CC      coreutils/printf.o
coreutils/printf.c: In function 'print_direc':
coreutils/printf.c:248:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://support.codesourcery.com/GNUToolchain/> for instructions.
make[2]: *** [coreutils/printf.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [coreutils] Error 2
make[1]: Leaving directory `/home/tux/aaa/buildroot/sh/output/build/busybox-1.21.1'
make: *** [/home/tux/aaa/buildroot/sh/output/build/busybox-1.21.1/.stamp_built] Error 2
tux at lmde ~/aaa/buildroot/sh $

Best regards,
Sabri

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15  9:38   ` Altunbas Sabri
@ 2013-11-15  9:41     ` Thomas De Schampheleire
  2013-11-15  9:57       ` Altunbas Sabri
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15  9:41 UTC (permalink / raw)
  To: buildroot

Hi Sabri,

On Fri, Nov 15, 2013 at 10:38 AM, Altunbas Sabri (DC-IA/EAH2)
<sabri.altunbas@boschrexroth.de> wrote:
> Hi Thomas,
>
> I defined
>
> ....
> BR2_TARGET_OPTIMIZATION="-pipe -mfmovd -mdalign"
> .....
>
> But I get following errors
>
> ....
> ....
> editors/awk.c: In function 'my_strtod':
> editors/awk.c:746:1: internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <https://support.codesourcery.com/GNUToolchain/> for instructions.
> make[2]: *** [editors/awk.o] Error 1
> make[1]: *** [editors] Error 2
> make[1]: *** Waiting for unfinished jobs....
>   CC      coreutils/hostid.o
>   CC      coreutils/id.o
>   CC      coreutils/install.o
>   CC      coreutils/ln.o
>   CC      coreutils/logname.o
>   CC      coreutils/ls.o
>   CC      coreutils/md5_sha1_sum.o
>   CC      coreutils/mkdir.o
>   CC      coreutils/mkfifo.o
>   CC      coreutils/mknod.o
>   CC      coreutils/mv.o
>   CC      coreutils/nice.o
>   CC      coreutils/nohup.o
>   CC      coreutils/od.o
>   CC      coreutils/printenv.o
>   CC      coreutils/printf.o
> coreutils/printf.c: In function 'print_direc':
> coreutils/printf.c:248:1: internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <https://support.codesourcery.com/GNUToolchain/> for instructions.
> make[2]: *** [coreutils/printf.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [coreutils] Error 2
> make[1]: Leaving directory `/home/tux/aaa/buildroot/sh/output/build/busybox-1.21.1'
> make: *** [/home/tux/aaa/buildroot/sh/output/build/busybox-1.21.1/.stamp_built] Error 2
> tux at lmde ~/aaa/buildroot/sh $
>


Could you provide more details?
Which buildroot version are you using, which toolchain, etc.?
Maybe a .config could be useful too.

Thanks,
Thomas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15  9:41     ` Thomas De Schampheleire
@ 2013-11-15  9:57       ` Altunbas Sabri
  2013-11-15 10:02         ` Thomas De Schampheleire
  0 siblings, 1 reply; 15+ messages in thread
From: Altunbas Sabri @ 2013-11-15  9:57 UTC (permalink / raw)
  To: buildroot

Hallo Thomas,
> Could you provide more details?
> Which buildroot version are you using, which toolchain, etc.?

Following information stand in .config

# Buildroot 2013.08.1 Configuration
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209=y

> Maybe a .config could be useful too.

Attented

My attention is to compile rootfs with gcc switches -mfmovd -mdalign enabling double floating point operation

Best regards,
Sabri


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ATT12405.config
Type: application/octet-stream
Size: 27937 bytes
Desc: ATT12405.config
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131115/8d618bd2/attachment-0001.obj>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15  9:57       ` Altunbas Sabri
@ 2013-11-15 10:02         ` Thomas De Schampheleire
  2013-11-15 10:05           ` Altunbas Sabri
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15 10:02 UTC (permalink / raw)
  To: buildroot

On Fri, Nov 15, 2013 at 10:57 AM, Altunbas Sabri (DC-IA/EAH2)
<sabri.altunbas@boschrexroth.de> wrote:
> Hallo Thomas,
>> Could you provide more details?
>> Which buildroot version are you using, which toolchain, etc.?
>
> Following information stand in .config
>
> # Buildroot 2013.08.1 Configuration
> BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209=y
>
>> Maybe a .config could be useful too.
>
> Attented
>
> My attention is to compile rootfs with gcc switches -mfmovd -mdalign enabling double floating point operation

Do you have the same error without those options?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15 10:02         ` Thomas De Schampheleire
@ 2013-11-15 10:05           ` Altunbas Sabri
  2013-11-15 10:10             ` Thomas De Schampheleire
  0 siblings, 1 reply; 15+ messages in thread
From: Altunbas Sabri @ 2013-11-15 10:05 UTC (permalink / raw)
  To: buildroot

Hallo Thomas,

> Do you have the same error without those options?

No, without these options I can create my rootfs very well

Best regards,
Sabri

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15 10:05           ` Altunbas Sabri
@ 2013-11-15 10:10             ` Thomas De Schampheleire
  2013-11-15 10:25               ` Altunbas Sabri
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15 10:10 UTC (permalink / raw)
  To: buildroot

Hi,

On Fri, Nov 15, 2013 at 11:05 AM, Altunbas Sabri (DC-IA/EAH2)
<sabri.altunbas@boschrexroth.de> wrote:
> Hallo Thomas,
>
>> Do you have the same error without those options?
>
> No, without these options I can create my rootfs very well
>

Then I think this problem is not buildroot related.

From the gcc manual, though:
       -mdalign
           Align doubles at 64-bit boundaries.  Note that this changes
the calling conventions,
           and thus some functions from the standard C library will
not work unless you recompile it
           first with -mdalign.

I don't know if this could cause an internal compiler error, but it
seems anyway that you won't be able to use a pre-compiled toolchain
and pass that -mdalign option...

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15 10:10             ` Thomas De Schampheleire
@ 2013-11-15 10:25               ` Altunbas Sabri
  2013-11-15 10:38                 ` Thomas De Schampheleire
  0 siblings, 1 reply; 15+ messages in thread
From: Altunbas Sabri @ 2013-11-15 10:25 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Thanks, this is a helpfull hint.

Have I the solution If I take buildroot-toolchain ?

Best regards,
Sabri

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15 10:25               ` Altunbas Sabri
@ 2013-11-15 10:38                 ` Thomas De Schampheleire
  2013-11-19 12:17                   ` Altunbas Sabri
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas De Schampheleire @ 2013-11-15 10:38 UTC (permalink / raw)
  To: buildroot

On Fri, Nov 15, 2013 at 11:25 AM, Altunbas Sabri (DC-IA/EAH2)
<sabri.altunbas@boschrexroth.de> wrote:
> Hi Thomas,
>
> Thanks, this is a helpfull hint.
>
> Have I the solution If I take buildroot-toolchain ?

You could build the toolchain entirely with buildroot yes, and make
sure that you pass the new options when compiling the toolchain. As
far as I can see, BR2_TARGET_OPTIMIZATIONS is not respected when
building the toolchain itself. I think you need
BR2_EXTRA_GCC_CONFIG_OPTIONS for that.

An alternative is to use crosstool-ng to build the toolchain, but of
course you'll have to make sure that the options are passed there as
well.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-15 10:38                 ` Thomas De Schampheleire
@ 2013-11-19 12:17                   ` Altunbas Sabri
  2013-11-19 12:30                     ` Gustavo Zacarias
  0 siblings, 1 reply; 15+ messages in thread
From: Altunbas Sabri @ 2013-11-19 12:17 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

my problem is still not solved.

I picked "Buildroot toolchain" and "eglibc" as C-library and get the following error
..
configure: error: unrecognized option: `-mfmovd'
..
With "uclibs" the same behave.

My config is attented

Can you give some hints ?

Command line output:
--------------------------------

...
...
(cd /home/tux/aaa/buildroot/sh/output/build/host-gcc-initial-4.7.3/build && rm -rf config.cache; PATH=/home/tux/aaa/buildroot/sh/output/../../../tc/sh/bin:/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm" CC="/usr/bin/gcc" GCC="/usr/bin/gcc" CXX="/usr/bin/g++" CPP="/usr/bin/cpp" CPPFLAGS="-I/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/include" CFLAGS="-O2 -I/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/include" CXXFLAGS="-O2 -I/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/include" LDFLAGS="-L/home/tux/aaa/buildroot/sh/output/../../../tc/sh/lib -L/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/lib -Wl,-rpath,/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/lib/pkgconfig:/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/share/pkgconfig" PERLLIB="/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/lib/perl" LD_LIBRARY_PATH="/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/lib:" CFLAGS="-O2 -I/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/include" LDFLAGS="-L/home/tux/aaa/buildroot/sh/output/../../../tc/sh/lib -L/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/lib -Wl,-rpath,/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/lib"  ./configure --prefix="/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr" --sysconfdir="/home/tux/aaa/buildroot/sh/output/../../../tc/sh/etc" --enable-shared --disable-static --disable-gtk-doc --disable-doc --disable-docs --disable-documentation --with-xmlto=no --with-fop=no  --target=sh4a-buildroot-linux-gnu --with-sysroot=/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr/sh4a-buildroot-linux-gnu/sysroot --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --with-gmp=/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr --with-mpfr=/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr  --enable-target-optspace --disable-libquadmath --enable-tls --enable-threads --with-mpc=/home/tux/aaa/buildroot/sh/output/../../../tc/sh/usr --disable-decimal-float --with-pkgversion="Buildroot 2013.08.1" --with-bugurl="http://bugs.buildroot.net/" --enable-languages=c --disable-shared --without-headers --with-newlib --disable-largefile --disable-nls -mfmovd -mdalign )
configure: error: unrecognized option: `-mfmovd'
Try `./configure --help' for more information.
make: *** [/home/tux/aaa/buildroot/sh/output/build/host-gcc-initial-4.7.3/.stamp_configured] Error 1
tux at lmde ~/aaa/buildroot/sh $

Best regards,
Sabri

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ATT73696.config
Type: application/octet-stream
Size: 31578 bytes
Desc: ATT73696.config
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131119/a74b0045/attachment-0001.obj>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-19 12:17                   ` Altunbas Sabri
@ 2013-11-19 12:30                     ` Gustavo Zacarias
  2013-11-19 17:23                       ` Arnout Vandecappelle
  2013-11-20 12:10                       ` Altunbas Sabri
  0 siblings, 2 replies; 15+ messages in thread
From: Gustavo Zacarias @ 2013-11-19 12:30 UTC (permalink / raw)
  To: buildroot

On 11/19/2013 09:17 AM, Altunbas Sabri (DC-IA/EAH2) wrote:

> Hi Thomas,
> 
> my problem is still not solved.
> 
> I picked "Buildroot toolchain" and "eglibc" as C-library and get the following error
> ..
> configure: error: unrecognized option: `-mfmovd'
> ..
> With "uclibs" the same behave.
> 
> My config is attented
> 
> Can you give some hints ?

Hi.
Actually BR2_EXTRA_GCC_CONFIG_OPTIONS isn't for that.
You need to set BR2_TARGET_OPTIMIZATIONS for all the packages to be
built with those CFLAGS, and you need to add them to
GLIBC_EXTRA_CFLAGS/UCLIBC_EXTRA_CFLAGS (depending on which libc you want
to use) - problem is that isn't supported in an easy way at the moment.
The quick way to test it would be to call make with those arguments in
every invocation (actually until your libc is built, for packages
BR2_TARGET_OPTIMIZATIONS does the trick), something like:

make GLIBC_EXTRA_CFLAGS="-madlign -mfmovd"

Regards.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-19 12:30                     ` Gustavo Zacarias
@ 2013-11-19 17:23                       ` Arnout Vandecappelle
  2013-11-20 11:45                         ` Gustavo Zacarias
  2013-11-20 12:10                       ` Altunbas Sabri
  1 sibling, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2013-11-19 17:23 UTC (permalink / raw)
  To: buildroot

On 19/11/13 13:30, Gustavo Zacarias wrote:
> On 11/19/2013 09:17 AM, Altunbas Sabri (DC-IA/EAH2) wrote:
>
>> Hi Thomas,
>>
>> my problem is still not solved.
>>
>> I picked "Buildroot toolchain" and "eglibc" as C-library and get the following error
>> ..
>> configure: error: unrecognized option: `-mfmovd'
>> ..
>> With "uclibs" the same behave.
>>
>> My config is attented
>>
>> Can you give some hints ?
>
> Hi.
> Actually BR2_EXTRA_GCC_CONFIG_OPTIONS isn't for that.
> You need to set BR2_TARGET_OPTIMIZATIONS for all the packages to be
> built with those CFLAGS, and you need to add them to
> GLIBC_EXTRA_CFLAGS/UCLIBC_EXTRA_CFLAGS (depending on which libc you want
> to use) - problem is that isn't supported in an easy way at the moment.
> The quick way to test it would be to call make with those arguments in
> every invocation (actually until your libc is built, for packages
> BR2_TARGET_OPTIMIZATIONS does the trick), something like:
>
> make GLIBC_EXTRA_CFLAGS="-madlign -mfmovd"

  Is there any reason why BR2_TARGET_OPTIMIZATIONS isn't used for 
building the C library?

  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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-19 17:23                       ` Arnout Vandecappelle
@ 2013-11-20 11:45                         ` Gustavo Zacarias
  0 siblings, 0 replies; 15+ messages in thread
From: Gustavo Zacarias @ 2013-11-20 11:45 UTC (permalink / raw)
  To: buildroot

On 11/19/2013 02:23 PM, Arnout Vandecappelle wrote:

>  Is there any reason why BR2_TARGET_OPTIMIZATIONS isn't used for
> building the C library?

The libc is somewhat fragile when built with some insane CFLAGS, for
instance (e)glibc is built at O2 (by Thomas P), allowing a switch to
another optimization level might be troublesome.
uClibc forces -Os in Rules.mak for BUILD_CFLAGS for example.
I'm unsure if we'd like to open pandora's box by merging them, maybe add
an option just for the libc?
Regards.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] buildroot: gcc options
  2013-11-19 12:30                     ` Gustavo Zacarias
  2013-11-19 17:23                       ` Arnout Vandecappelle
@ 2013-11-20 12:10                       ` Altunbas Sabri
  1 sibling, 0 replies; 15+ messages in thread
From: Altunbas Sabri @ 2013-11-20 12:10 UTC (permalink / raw)
  To: buildroot

Hi Gustavo,

Thanks, it works with
make GLIBC_EXTRA_CFLAGS="-mdalign -mfmovd"

But I had to make "make clean" and this moves all the things what I created i.g.toolchain,...
Is this a possibility that only compiled files are moved and not toolchain ?

Best regards,
Sabri

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-11-20 12:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-15  9:03 [Buildroot] buildroot: gcc options Altunbas Sabri
2013-11-15  9:13 ` Thomas De Schampheleire
2013-11-15  9:38   ` Altunbas Sabri
2013-11-15  9:41     ` Thomas De Schampheleire
2013-11-15  9:57       ` Altunbas Sabri
2013-11-15 10:02         ` Thomas De Schampheleire
2013-11-15 10:05           ` Altunbas Sabri
2013-11-15 10:10             ` Thomas De Schampheleire
2013-11-15 10:25               ` Altunbas Sabri
2013-11-15 10:38                 ` Thomas De Schampheleire
2013-11-19 12:17                   ` Altunbas Sabri
2013-11-19 12:30                     ` Gustavo Zacarias
2013-11-19 17:23                       ` Arnout Vandecappelle
2013-11-20 11:45                         ` Gustavo Zacarias
2013-11-20 12:10                       ` Altunbas Sabri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.