• Kevin Cernekee's avatar
    Use AX_CHECK_VSCRIPT to test for version script support · b930aad6
    Kevin Cernekee authored
    AX_CHECK_VSCRIPT improves on the current detection method by adding a
    new check for false positives.  On OSX, the current check fails, but only
    by accident:
    
        configure:14730: checking if library symbol versioning is available
        configure:14734: gcc -c -g -O2  conftest.c >&5
        configure:14737: $? = 0
        configure:14741: gcc -dynamiclib ${wl}-undefined ${wl}dynamic_lookup -o  conftest.o   -install_name /conftest   -Wl,--version-script -Wl,conftest.map
        clang: error: no such file or directory: '${wl}-undefined'
        clang: error: no such file or directory: '${wl}dynamic_lookup'
        configure:14744: $? = 1
        configure:14749: gcc -dynamiclib ${wl}-undefined ${wl}dynamic_lookup -o  conftest.o   -install_name /conftest   -Wl,-M -Wl,conftest.map
        clang: error: no such file or directory: '${wl}-undefined'
        clang: error: no such file or directory: '${wl}dynamic_lookup'
        configure:14752: $? = 1
        configure:14759: result: no
    
    Passing -Wl,-M,conftest.map on OSX may or may not actually cause a build
    failure:
    
        $ gcc conftest.c -o conftest -Wl,-M,conftest.map ; echo $?
        ld: warning: ignoring file conftest.map, file was built for unsupported file format ( 0x56 0x31 0x20 0x7B 0x20 0x67 0x6C 0x6F 0x62 0x61 0x6C 0x3A 0x20 0x24 0x32 0x3B ) which is not the architecture being linked (x86_64): conftest.map
        0
    
        $ gcc conftest.c -o conftest -Wl,-M,conftest-short.map ; echo $?
        ld: file too small (length=2) file 'conftest-short.map' for architecture x86_64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
        1
    
    After getting a successful result from the above -M check,
    AX_CHECK_VSCRIPT will try another version script containing syntax errors.
    It will report a failure (unsupported) if the linker still accepts the
    malformed script.
    Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
    Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
    b930aad6
Name
Last commit
Last update
..
ax_check_vscript.m4 Loading commit data...
iconv.m4 Loading commit data...
lib-ld.m4 Loading commit data...
lib-link.m4 Loading commit data...
lib-prefix.m4 Loading commit data...