[ipxe-devel] [OpenBSD] compilation error: net/80211/wpa.c:424: warning: format '%d' expects type '

Stuart Henderson sthen at openbsd.org
Sat Dec 7 10:46:13 UTC 2013


On 2013/12/06 17:05, Michael Brown wrote:
> On 02/12/13 14:59, Jiri B wrote:
> ># gmake bin/undionly.kpxe
> >   [BIN] bin/undionly.kpxe.bin
> >   [ZINFO] bin/undionly.kpxe.zinfo
> >   [ZBIN] bin/undionly.kpxe.zbin
> >Add at 0x787 outside output buffer
> >Makefile.housekeeping:1052: recipe for target 'bin/undionly.kpxe.zbin' failed
> >gmake: *** [bin/undionly.kpxe.zbin] Error 1
> >gmake: *** Deleting file 'bin/undionly.kpxe.zbin'
> >rm bin/undionly.kpxe.zinfo bin/undionly.kpxe.bin
> >
> ># cat -n Makefile.housekeeping | sed -n '1049,1054p'
> >   1049  # Compress raw binary file
> >   1050  #
> >   1051  $(BIN)/%.zbin : $(BIN)/%.bin $(BIN)/%.zinfo $(ZBIN)
> >   1052          $(QM)$(ECHO) "  [ZBIN] $@"
> >   1053          $(Q)$(ZBIN) $(BIN)/$*.bin $(BIN)/$*.zinfo>  $@
> >   1054
> >-%-
> >
> >Any idea? Old GNU ld on OpenBSD, any workaround?
> 
> For reference, this should be fixed as of commit
> 
>   http://git.ipxe.org/ipxe.git/commitdiff/1403bda
> 
> Michael
> 

They're not exactly dynamically linked, but PIE is used by default
in OpenBSD (opt-out rather than opt-in; every program uses PIE unless
specifically told not to).

So, even though the files are statically linked, they still use
ld.so which handles the relocation.

The more accurate fix would probably be using "-fno-pie" rather than
"-static". (-static implies -fno-pie).

c.f. memtest86+,
http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/sysutils/memtest86+/patches/patch-Makefile




More information about the ipxe-devel mailing list