[syslinux] elflink: STORAGE_DEVICE_NUMBER proposal

H. Peter Anvin hpa at zytor.com
Sun Jul 8 00:45:09 PDT 2012


On 07/04/2012 06:07 PM, Gene Cumm wrote:
> (I realize this may get delayed)
> 
> Per a2fd4f6, the mingw environment should provide a typedef for
> STORAGE_DEVICE_NUMBER.  However, several are known to not provide
> this.  If it exists, that .definition is preferable to one we may
> create.  As a result, a solution should be found for the broken
> compilers.
> 
> I have a proposal for a solution that while not elegant does achieve this task:
> 
> A shell script, gcc-detect-storage_device_number.sh, would use gcc to
> attempt to compile a tiny .c module that utilizes
> STORAGE_DEVICE_NUMBER, deletes the temporary binary if present and the
> script's return value is based on whether the compile is successful.
> 
> In win32/Makefile, the return is set to a variable.  If no
> STORAGE_DEVICE_NUMBER is defined, do something like "CFLAGS +=
> -DSYSLINUX_TYPE_STORAGE_DEVICE_NUMBER=1".
> 
> In win32/syslinux.c, change the "#if 0" to "#if
> SYSLINUX_TYPE_STORAGE_DEVICE_NUMBER >= 1"
> 

A much more serious question is why the Syslinux installer plain doesn't
work if compiled with mingw-w64 in 32-bit mode as shipped in Fedora 17.

	-hpa



More information about the Syslinux mailing list