dvdhrm / kmscon

Linux KMS/DRM based virtual Console Emulator
http://www.freedesktop.org/wiki/Software/kmscon
Other
436 stars 81 forks source link

unifont: error: format 'default' not supported; treating as elf (supported formats: elf, binary) #83

Closed crrodriguez closed 11 years ago

crrodriguez commented 11 years ago

mod_unifont_la_LDFLAGS = \ $(AM_LDFLAGS) \ -module \ -avoid-version \ -Wl,-z,noexecstack \ -Wl,--format=binary -Wl,$(UNIFONT_BIN) -Wl,--format=default

-Wl,--format=default is invalid with the gold linker. (binutils 2.23.1/ gcc 4.8) you must pick between binary and elf.

dvdhrm commented 11 years ago

I only have binutils 2.23.1 and gcc 4.7 to test this now. Please tell me exactly what options the gold linker accepts. The thing is, ld <= 2.23.1 is totally fine with --format=default so I wonder why upstream gold doesn't accept that. Could you tell me what command-line option gold requires? Is it --format=elf? Or does it require the correct elf64-x86-64 etc. line?

As a workaround, you can use --with-fonts=pango (that is, without "unifont").

Thanks David

crrodriguez commented 11 years ago

using "elf" works just fine, results in a DSO with the correct elf64-x86-64.

crrodriguez commented 11 years ago

the only accepted options are --format [elf,binary]

dvdhrm commented 11 years ago

The old linker doesn't accept "elf" as format. I hate this already. Maybe I should drop that "--format=default" entirely and rely on gcc to pass the right format for all objects.

Any standard way to detect the gold linker in autoconf?

dvdhrm commented 11 years ago

Ok, I actually didn't get autotools to use ld.gold but I tried it separately and the issue should be fixed with aeddc5b5528a6308db70b13c54dfae4c5d47cc1f. Can you give it a try?

Thanks! David

crrodriguez commented 11 years ago

That should work, I will try it later, however I'm gonna talk to the gold people first, this looks like a bug to me as gold is supposed to be compatible with the old ld.

crrodriguez commented 11 years ago

Fixed in gold HEAD --> http://sourceware.org/ml/binutils/2013-03/msg00119.html

dvdhrm commented 11 years ago

Thanks a lot for reporting this upstream. This does simplify things a lot, even though, the BFD architecture identifiers are still ugly to use in autotools.

Thanks! David