Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lang/gcc48,49,5,6: Refine the condition to enable multilib #65

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions lang/gcc10/options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ PKG_SUGGESTED_OPTIONS+= gcc-inplace-math always-libgcc
PKG_SUGGESTED_OPTIONS+= always-libgcc
.endif

###
### Determine if multilib is avalible.
###
MULTILIB_SUPPORTED?= unknown
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
. 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
. endif
.endif
.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
PKG_SUPPORTED_OPTIONS+= gcc-multilib
PKG_SUGGESTED_OPTIONS+= gcc-multilib
Expand Down
12 changes: 0 additions & 12 deletions lang/gcc48/options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ PKG_SUGGESTED_OPTIONS.SunOS+= gcc-inplace-math always-libgcc
PKG_SUGGESTED_OPTIONS+= always-libgcc
.endif

###
### Determine if multilib is avalible.
###
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)
MULTILIB_SUPPORTED= No
. else
MULTILIB_SUPPORTED= Yes
. endif
.endif
.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
PKG_SUPPORTED_OPTIONS+= gcc-multilib
PKG_SUGGESTED_OPTIONS+= gcc-multilib
Expand Down
12 changes: 0 additions & 12 deletions lang/gcc49/options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ PKG_SUGGESTED_OPTIONS.SunOS+= gcc-go gcc-inplace-math always-libgcc
PKG_SUGGESTED_OPTIONS+= always-libgcc
.endif

###
### Determine if multilib is avalible.
###
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)
MULTILIB_SUPPORTED= No
. else
MULTILIB_SUPPORTED= Yes
. endif
.endif
.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
PKG_SUPPORTED_OPTIONS+= gcc-multilib
PKG_SUGGESTED_OPTIONS+= gcc-multilib
Expand Down
12 changes: 0 additions & 12 deletions lang/gcc5/options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ PKG_SUGGESTED_OPTIONS.SunOS+= gcc-inplace-math always-libgcc
PKG_SUGGESTED_OPTIONS+= always-libgcc
.endif

###
### Determine if multilib is avalible.
###
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)
MULTILIB_SUPPORTED= No
. else
MULTILIB_SUPPORTED= Yes
. endif
.endif
.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
PKG_SUPPORTED_OPTIONS+= gcc-multilib
PKG_SUGGESTED_OPTIONS+= gcc-multilib
Expand Down
12 changes: 0 additions & 12 deletions lang/gcc6/options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ PKG_SUGGESTED_OPTIONS+= gcc-inplace-math always-libgcc
PKG_SUGGESTED_OPTIONS+= always-libgcc
.endif

###
### Determine if multilib is avalible.
###
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)
MULTILIB_SUPPORTED= No
. else
MULTILIB_SUPPORTED= Yes
. endif
.endif
.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
PKG_SUPPORTED_OPTIONS+= gcc-multilib
PKG_SUGGESTED_OPTIONS+= gcc-multilib
Expand Down
17 changes: 0 additions & 17 deletions lang/gcc7/options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,6 @@ PKG_SUGGESTED_OPTIONS+= always-libgcc

PKG_SUGGESTED_OPTIONS.SunOS+= always-libgcc

###
### Determine if multilib is avalible.
###
MULTILIB_SUPPORTED?= unknown
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
. 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
. endif
.endif
.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
PKG_SUPPORTED_OPTIONS+= gcc-multilib
PKG_SUGGESTED_OPTIONS+= gcc-multilib
Expand Down
17 changes: 0 additions & 17 deletions lang/gcc8/options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ PKG_SUGGESTED_OPTIONS+= gcc-inplace-math always-libgcc
PKG_SUGGESTED_OPTIONS+= always-libgcc
.endif

###
### Determine if multilib is avalible.
###
MULTILIB_SUPPORTED?= unknown
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
. 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
. endif
.endif
.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
PKG_SUPPORTED_OPTIONS+= gcc-multilib
PKG_SUGGESTED_OPTIONS+= gcc-multilib
Expand Down
24 changes: 4 additions & 20 deletions lang/gcc9/options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,9 @@ PKG_SUGGESTED_OPTIONS+= gcc-inplace-math always-libgcc
PKG_SUGGESTED_OPTIONS+= always-libgcc
.endif

###
### Determine if multilib is avalible.
###
MULTILIB_SUPPORTED?= unknown
.if ${MACHINE_PLATFORM:MLinux-*-x86_64}
. if exists(/usr/include/x86_64-linux-gnu/gnu)
GCC9_INCLUDE_DIR= /usr/include/x86_64-linux-gnu/gnu
. else
GCC9_INCLUDE_DIR= /usr/include/gnu
. endif
. if exists(${GCC9_INCLUDE_DIR}/stubs-64.h) && \
!exists(${GCC9_INCLUDE_DIR}/stubs-32.h)
MULTILIB_SUPPORTED= no
. else
MULTILIB_SUPPORTED= yes
. endif
. if ${MULTILIB_SUPPORTED} == yes
.if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss])
PKG_SUPPORTED_OPTIONS+= gcc-multilib
PKG_SUGGESTED_OPTIONS+= gcc-multilib
. endif
.endif

.include "../../mk/bsd.options.mk"
Expand Down Expand Up @@ -92,8 +75,9 @@ CONFIGURE_ARGS+= --disable-nls
###
### Multilib Support
###
.if ${MULTILIB_SUPPORTED} == no \
|| (${MULTILIB_SUPPORTED} == yes && !${PKG_OPTIONS:Mgcc-multilib})
.if (!empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss]) && \
empty(PKG_OPTIONS:Mgcc-multilib) ) || \
!empty(MULTILIB_SUPPORTED:M[Nn][Oo])
CONFIGURE_ARGS+= --disable-multilib
.endif

Expand Down
18 changes: 17 additions & 1 deletion mk/platform/Linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ USERADD?= /usr/sbin/useradd
_OPSYS_EMULDIR.linux= # empty
_OPSYS_EMULDIR.linux32= # empty

# Determine if multilib is available.
MULTILIB_SUPPORTED?= unknown
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
. if exists(/usr/include/x86_64-linux-gnu/gnu)
_OPSYS_GNU_INCLUDE_DIR= /usr/include/x86_64-linux-gnu/gnu
. else
_OPSYS_GNU_INCLUDE_DIR= /usr/include/gnu
. endif
. if exists(${_OPSYS_GNU_INCLUDE_DIR}/stubs-64.h) && \
!exists(${_OPSYS_GNU_INCLUDE_DIR}/stubs-32.h)
MULTILIB_SUPPORTED= no
. else
MULTILIB_SUPPORTED= yes
. endif
.endif

# Support Debian/Ubuntu's multiarch hierarchy.
.if exists(/etc/debian_version)
. if !empty(MACHINE_ARCH:Mx86_64)
Expand Down Expand Up @@ -176,7 +192,7 @@ GLIBC_VERSION= ${_GLIBC_VERSION_CMD:sh}
. endif
.endfor

# If this is defined pass it to the make process.
# If this is defined pass it to the make process.
.if defined(NOGCCERROR)
MAKE_ENV+= NOGCCERROR=true
.endif