[syslinux] elflink: STORAGE_DEVICE_NUMBER proposal

Matt Fleming matt at console-pimps.org
Fri Nov 2 08:35:39 PDT 2012


On Wed, 2012-07-04 at 21:07 -0400, 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"

Peter, now that we've tackled the mingw/Fedora-17 breakage, what are
your thoughts on this solution?

-- 
Matt Fleming, Intel Open Source Technology Center




More information about the Syslinux mailing list