Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Stage1 install dies if -mregparm=3 specified in make.conf?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
KPara
n00b
n00b


Joined: 02 Sep 2003
Posts: 17

PostPosted: Wed Sep 03, 2003 7:44 am    Post subject: Stage1 install dies if -mregparm=3 specified in make.conf? Reply with quote

I'm trying to migrate a file server from Slackware to Gentoo. I customized make.conf with optimizations for my Athlon, and it caused build breaks in sed, ncurses, and presumably other packages (it didn't make it very far). Worse, it does something strange to Python. After the bootstrap failed, Python would report that its version (1010) differed from module (null)'s version (-1073741824) whenever I ran any of the Gentoo scripts like emerge, so I'd have to start from scratch again. I experimented a little bit, and when I removed -mregparm=3, everything built fine.

The really bizarre part is where the build breaks. Apparently sed does not rely on getline from the runtime libraries. It rolls its own version in getline.c, and -mregparm=3 causes the GCC compiler to complain about different function definitions. There is an alternate definition of getline in /usr/include/bits/stdio.h which gets used and causes the break.

Why would -mregparm=3 cause build breaks? I'd really like to build my system with a register parameter calling convention, but it seems I will have to make do with the default.
Back to top
View user's profile Send private message
blunt88
n00b
n00b


Joined: 03 Nov 2002
Posts: 22

PostPosted: Mon Mar 29, 2004 1:52 am    Post subject: Reply with quote

if you read the man pages for gcc, you find this for -mregparm:
Quote:
Control how many registers are used to pass integer arguments. By
default, no registers are used to pass arguments, and at most 3
registers can be used. You can control this behavior for a spe-
cific function by using the function attribute regparm.

Warning: if you use this switch, and num is nonzero, then you must
build all modules with the same value, including any libraries.
This includes the system libraries and startup modules.


special note to the warning. everything must be built with the option.

since bootstrapping is replacing programs as it runs, some are going to have the default settings (regparms=0) and others won't. I have the same type of problem, it makes it through the first package (not sure what is is) then constantly fails on sed. I found that if i dropped regparms from 2 to 1, i got a little futher, but it still failed eventually.

what you would need to do, is roll your on install, that replaces everything (i assume) in the tarball with binaries compiled with mfregparm=3, I don't think this is too hard. I believe there is a way to create your own install tarballs/cross compile for another system without going through all the chroot stuff.

let me know if you have any good ideas on how to get around it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
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