[syslinux] elflink: STORAGE_DEVICE_NUMBER proposal

H. Peter Anvin hpa at zytor.com
Fri Nov 2 13:15:47 PDT 2012


On 11/02/2012 08:35 AM, Matt Fleming wrote:
> 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?
> 

I think the solution we have now (always use a private copy) should
work; if it doesn't then we can attack it differently.

	-hpa




More information about the Syslinux mailing list