Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 53567 - libaio won't build on x86
Summary: libaio won't build on x86
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Developers for the x86 Architecture
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-10 12:35 UTC by Scott Smith
Modified: 2004-06-11 17:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Smith 2004-06-10 12:35:22 UTC
libaio won't build on x86 because there is a patch that incorrectly applies the '-fPIC' to the library.  Since the library has no global variables, it does not need the -fPIC option (see http://docs.freebsd.org/info/gcc/gcc.info.Code_Gen_Options.html)

Without that it works fine (I've been using it myself on my Pentium III without a problem).  Since ebx (the PIC register) is callee saved, it's modification by the library (in order to make the syscall) will automatically cause it to be saved, thus you don't have to worry about it affecting the function that calls the aio library. (compile with -S for yourself to verify)

Also the description should probably be changed to "Asynchronous I/O library that uses the kernels native interface" since the library is not specific to Oracle.
Comment 1 Danny van Dyk (RETIRED) gentoo-dev 2004-06-11 06:53:13 UTC
I solved the -fPIC problem but i won't and can't keyword it ~x86.
Reassigning to x86...

Scott: -fPIC is neede on several ARCHs, e.g all 64bit archs + hppa.
Comment 2 Scott Smith 2004-06-11 09:43:50 UTC
I'm pretty sure -fPIC is not needed on any platform UNLESS you have global variables for your shared library.  This library has no global variables, so it's not needed.

stack variables are referenced via the stack pointer, and the only function calls (which are relative anyways) are either syscalls or the callback in io_queue_run (in which case the callback function is passed as a parameter).

I don't have a cross compiler installed, but I would venture that the register is not used for anything in this library...
Comment 3 Ian Leitch (RETIRED) gentoo-dev 2004-06-11 17:32:27 UTC
Marked ~x86.