Skip to content
Snippets Groups Projects
  • YunQiang Su's avatar
    70d30dd6
    config-ml.in: Fix multi-os-dir search · 70d30dd6
    YunQiang Su authored
    When building multilib libraries, CC/CXX etc are set with an option
    -B*/lib/, instead of -B<something>/lib/<multi-os-directory>.
    This will make some trouble in some case, for example building
    cross toolchain based on Debian's cross packages:
    
      If we have libc6-dev-i386-amd64-cross packages installed on
      a non-x86 machine. This package will have the files in
      /usr/x86_4-linux-gnu/lib32.  The fellow configure will fail
      when build libgcc for i386, with complains the libc is not
      i386 ones:
         ../configure --enable-multilib --enable-multilib \
                --target=x86_64-linux-gnu
    
    Let's insert a "-B*/lib/`CC ${flags} --print-multi-os-directory`"
    before "-B*/lib/".
    
    This patch is based on the patch used by Debian now.
    
    ChangeLog
    
    	* config-ml.in: Insert an -B option with multi-os-dir into
    	compiler commands used to build libraries.
    70d30dd6
    History
    config-ml.in: Fix multi-os-dir search
    YunQiang Su authored
    When building multilib libraries, CC/CXX etc are set with an option
    -B*/lib/, instead of -B<something>/lib/<multi-os-directory>.
    This will make some trouble in some case, for example building
    cross toolchain based on Debian's cross packages:
    
      If we have libc6-dev-i386-amd64-cross packages installed on
      a non-x86 machine. This package will have the files in
      /usr/x86_4-linux-gnu/lib32.  The fellow configure will fail
      when build libgcc for i386, with complains the libc is not
      i386 ones:
         ../configure --enable-multilib --enable-multilib \
                --target=x86_64-linux-gnu
    
    Let's insert a "-B*/lib/`CC ${flags} --print-multi-os-directory`"
    before "-B*/lib/".
    
    This patch is based on the patch used by Debian now.
    
    ChangeLog
    
    	* config-ml.in: Insert an -B option with multi-os-dir into
    	compiler commands used to build libraries.
config-ml.in 25.80 KiB