Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
>gcc-6.3
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5043
Location: Removed by Neddy

PostPosted: Mon Jun 19, 2017 10:35 am    Post subject: Reply with quote

this for building the kernel correct?
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7222
Location: ~Brussels - Belgique

PostPosted: Mon Jun 19, 2017 10:35 am    Post subject: Reply with quote

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
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 5686

PostPosted: Mon Jun 19, 2017 5:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7222
Location: ~Brussels - Belgique

PostPosted: Thu Jun 22, 2017 7:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 5804

PostPosted: Thu Jun 22, 2017 7:46 pm    Post subject: Reply with quote

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 :D

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
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