diff --git a/lang/gcc48/options.mk b/lang/gcc48/options.mk index f3c0fd96e2b2..06cca3a9029b 100644 --- a/lang/gcc48/options.mk +++ b/lang/gcc48/options.mk @@ -22,8 +22,13 @@ PKG_SUGGESTED_OPTIONS+= always-libgcc ### MULTILIB_SUPPORTED?= unknown .if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) -. if exists(/usr/include/gnu/stubs-64.h) && \ - !exists(/usr/include/gnu/stubs-32.h) +. if exists(/usr/include/x86_64-linux-gnu/gnu) +_GNU_INCLUDE_DIR= /usr/include/x86_64-linux-gnu/gnu +. else +_GNU_INCLUDE_DIR= /usr/include/gnu +. endif +. if exists(${_GNU_INCLUDE_DIR}/stubs-64.h) && \ + !exists(${_GNU_INCLUDE_DIR}/stubs-32.h) MULTILIB_SUPPORTED= No . else MULTILIB_SUPPORTED= Yes diff --git a/lang/gcc49/options.mk b/lang/gcc49/options.mk index 92086356db4f..83c9e43d3503 100644 --- a/lang/gcc49/options.mk +++ b/lang/gcc49/options.mk @@ -22,8 +22,13 @@ PKG_SUGGESTED_OPTIONS+= always-libgcc ### MULTILIB_SUPPORTED?= unknown .if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) -. if exists(/usr/include/gnu/stubs-64.h) && \ - !exists(/usr/include/gnu/stubs-32.h) +. if exists(/usr/include/x86_64-linux-gnu/gnu) +_GNU_INCLUDE_DIR= /usr/include/x86_64-linux-gnu/gnu +. else +_GNU_INCLUDE_DIR= /usr/include/gnu +. endif +. if exists(${_GNU_INCLUDE_DIR}/stubs-64.h) && \ + !exists(${_GNU_INCLUDE_DIR}/stubs-32.h) MULTILIB_SUPPORTED= No . else MULTILIB_SUPPORTED= Yes diff --git a/lang/gcc5/options.mk b/lang/gcc5/options.mk index 9887adc2d551..e94a01bb92b2 100644 --- a/lang/gcc5/options.mk +++ b/lang/gcc5/options.mk @@ -22,8 +22,13 @@ PKG_SUGGESTED_OPTIONS+= always-libgcc ### MULTILIB_SUPPORTED?= unknown .if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) -. if exists(/usr/include/gnu/stubs-64.h) && \ - !exists(/usr/include/gnu/stubs-32.h) +. if exists(/usr/include/x86_64-linux-gnu/gnu) +_GNU_INCLUDE_DIR= /usr/include/x86_64-linux-gnu/gnu +. else +_GNU_INCLUDE_DIR= /usr/include/gnu +. endif +. if exists(${_GNU_INCLUDE_DIR}/stubs-64.h) && \ + !exists(${_GNU_INCLUDE_DIR}/stubs-32.h) MULTILIB_SUPPORTED= No . else MULTILIB_SUPPORTED= Yes diff --git a/lang/gcc6/options.mk b/lang/gcc6/options.mk index 4d60bd513e1e..2c0dfbdbc409 100644 --- a/lang/gcc6/options.mk +++ b/lang/gcc6/options.mk @@ -28,8 +28,13 @@ PKG_SUGGESTED_OPTIONS+= always-libgcc ### MULTILIB_SUPPORTED?= unknown .if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) -. if exists(/usr/include/gnu/stubs-64.h) && \ - !exists(/usr/include/gnu/stubs-32.h) +. if exists(/usr/include/x86_64-linux-gnu/gnu) +_GNU_INCLUDE_DIR= /usr/include/x86_64-linux-gnu/gnu +. else +_GNU_INCLUDE_DIR= /usr/include/gnu +. endif +. if exists(${_GNU_INCLUDE_DIR}/stubs-64.h) && \ + !exists(${_GNU_INCLUDE_DIR}/stubs-32.h) MULTILIB_SUPPORTED= No . else MULTILIB_SUPPORTED= Yes