-   Slackware (
-   -   Slackware standard configure script options? (

business_kid 12-09-2012 02:33 PM

Slackware standard configure script options?
It seems I need to recompile binutils for some stoopid option in objcopy. It's being compiled on Slackware64-14.0, for slackware64-14.0. I'd need to get efi object compatibility on objcopy. So from the top source, does this look OK?

mkdir ../binutils-build
cd ../binutils-build
../binutils-2.23.1/configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --host=x86_64 --build=x86_64 --enable-shared --??

what I can find on efi stuff is this


--subsystem which:major.minor
Specifies the subsystem under which your program will execute. The
legal values for which are "native", "windows", "console", "posix",
"efi-app", "efi-bsd", "efi-rtd", "sal-rtd", and "xbox". You may
optionally set the subsystem version also. Numeric values are also
accepted for which. [This option is specific to PE targets.]
and this :-o.


Using GNU toolchain for compiling and debugging EFI applications

GNU development toolchain consist of binutils package (assembler, linker, various utilities for manipulating executable images), GCC compiler, GNU make and GDB debugger. Advantages are obvious - build system is very flexible, the tools have very rich functionality, they are free and open source, your EFI application code can be easily integrated to any project. Most of open source software prefers this way.

The first step is to compile your tools with required options. Firstly you need to compile binutils package. Obtain the latest from You will need to enable "i386-efi-pe" target to have support for EFI PE+ executable format. If you use the same toolchain for compiling something else in your project (e.g. OS kernel) you can also specify required target (e.g. x86_64-myOS-freebsd) Note that it is BFD target, not the target platform. If you want to develop for 64-bits platform add "--enable-64-bit-bfd" options to "configure" script.

../src/configure --prefix=$PREFIX --target=$TARGET --disable-nls --build=$BUILD --enable-64-bit-bfd \
These targets don't show in ./configure --help, and there's talk 5 years back of this stuff, so I presume they exist. So I tried all those options to see what it would throw out. It threw out build, host & target but pointed out (wrongly) that most of the tools had been just compiled :-/.

Can anyone point me?

gnashley 12-10-2012 01:04 AM

First, you'll want to use the same options used when compiling the standard package (plus your options), so refer to the official SlackBuild for those. Then, find out about the efi options available with `./configure --help` or by searching the or file for 'efi'. Then edit the SlackBuild to add the options you need and use it to create the package.

wildwizard 12-10-2012 01:33 AM

Checking the Slackbuild in Slackware it seems to already be setup.

business_kid 12-10-2012 12:39 PM


Originally Posted by wildwizard (Post 4846009)
Checking the Slackbuild in Slackware it seems to already be setup.

One bit of it is. When I built it straight with my own options and none of the other stuff, last night, I had no problems and it swallowed everything. Building from the slackbuild, it's complaining about the --enable-targets line and keeps barfing because of the silly things. At least I have the original options, which is good. I'll postpone this until I'm sure objcopy barfs.

On another note, I needed to rebuild the kernel to add in the 'relocatable' option. This whole UEFI thing is a @#@%! nightmare, because everyone does it differently. It can be disabled, and you can use a 'legacy OS' But how to set up a bootloader for the legacy os is the best kept secret out there.

business_kid 12-11-2012 09:22 AM

From gnu-efi-3.0/README.gnuefi:


** Prerequisites:

To develop x86 and x86_64 EFI applications, the following tools are needed:
. . . . .
- A version of "objcopy" that supports EFI applications. To
check if your version includes EFI support, issue the

objcopy --help

and verify that the line "supported targets" contains the
string "efi-app-ia32" and "efi-app-x86_64". The binutils release
binutils- supports Intel64 EFI.

- For debugging purposes, it's useful to have a version of
"objdump" that supports EFI applications as well. This
allows inspect and disassemble EFI binaries.
Slackware's does not. And we need a relocatable kernel.

wildwizard 12-15-2012 06:31 AM

That readme is very, very out of date

The correct symbols are pei-*

See binutils-${VER}/bfd/Changelog-2009

business_kid 12-15-2012 08:54 AM

So they updated everything except the README :-/.

Thx Wildwizard. I tried Slackware's
objcopy --help, and it said not.

I tried it on the job, and it worked.

All times are GMT -5. The time now is 05:16 AM.