View previous topic :: View next topic |
Author |
Message |
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Mon Jun 19, 2017 10:35 am Post subject: |
|
|
this for building the kernel correct? _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8708 Location: ~Brussels - Belgique
|
Posted: Mon Jun 19, 2017 10:35 am Post subject: |
|
|
Hi Neddy,
I have ld.gold enabled by default and want to temporarily disable it to manually compile the kernel.
Do I have to switch back to ld.bdf and enable ld.gold in the CFLAGS? _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Mon Jun 19, 2017 5:14 pm Post subject: |
|
|
xaviermiller wrote: | what I do is Code: | CFLAGS="-fuse-ld=bfd" LD="ld.bfd" make | but the environment variables are not well taken into account |
LD is often not honoured, because the compiler is directly used for linking. You should put -fuse-ld=bfd also to LDFLAGS (and perhaps also to CXXFLAGS, FFLAGS, ...). |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8708 Location: ~Brussels - Belgique
|
Posted: Thu Jun 22, 2017 7:36 pm Post subject: |
|
|
CFLAGS is not enough, but if I define CC and LDFLAGS, it works: Code: | make CC="gcc -fuse-ld=bfd -Wl,-fuse-ld=bfd" LDFLAGS="-fuse-ld=bfd" -j5 -l2 all modules |
Other options with CFLAGS or LD don't work. _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Jun 22, 2017 7:46 pm Post subject: |
|
|
xaviermiller wrote: | CFLAGS is not enough, but if I define CC and LDFLAGS, it works: Code: | make CC="gcc -fuse-ld=bfd -Wl,-fuse-ld=bfd" LDFLAGS="-fuse-ld=bfd" -j5 -l2 all modules |
Other options with CFLAGS or LD don't work. |
CC="gcc oh_let_s_do_dirty_hack_here"
But hey, if it works
edit:
If i remember well, kernel kick out any cflags or settings you set and put its own fixed settings that depends on cpu type set in the kernel.
If i also remember well, i think i saw a patch for kernel (from patches provide in gentoo-sources url) that enable more cpu, cflags...
You might use that patch for your kernel to allow specific cflags or optimization, but really, if the hack works, well, it's easy and do the job with no bad issue.
edit: here it is https://dev.gentoo.org/~mpagano/genpatches/trunk/4.0/5000_enable-additional-cpu-optimizations-for-gcc.patch |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|