hwloc: Fix build with clang17

This moves -mwindows option to LDFLAGS from CFLAGS and fixes the following compiler error.
clang: error: unsupported option '-mwindows' for target 'x86_64-w64-windows-gnu'
This commit is contained in:
Biswapriyo Nath
2023-09-30 14:16:11 +00:00
parent 30a462bed0
commit b9dfd3a815
2 changed files with 19 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
--- a/utils/lstopo/Makefile.am
+++ b/utils/lstopo/Makefile.am
@@ -59,8 +59,9 @@
endif
lstopo_win_SOURCES = $(lstopo_SOURCES)
lstopo_win_CPPFLAGS = $(lstopo_CPPFLAGS)
-lstopo_win_CFLAGS = $(lstopo_CFLAGS) -mwindows
+lstopo_win_CFLAGS = $(lstopo_CFLAGS)
lstopo_win_LDADD = $(lstopo_LDADD)
+lstopo_win_LDFLAGS = -mwindows
endif
man1_pages = lstopo-no-graphics.1

View File

@@ -20,13 +20,16 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cairo"
optdepends=("${MINGW_PACKAGE_PREFIX}-cairo"
"${MINGW_PACKAGE_PREFIX}-libxml2")
options=('!docs')
license=('BSD')
license=('spdx:BSD-3-Clause')
url='https://www.open-mpi.org/projects/hwloc/'
source=(https://www.open-mpi.org/software/hwloc/v${pkgver%.*}/downloads/${_realname}-${pkgver}.tar.bz2)
sha256sums=('5c4062ce556f6d3451fc177ffb8673a2120f81df6835dea6a21a90fbdfff0dec')
source=(https://www.open-mpi.org/software/hwloc/v${pkgver%.*}/downloads/${_realname}-${pkgver}.tar.bz2
0001-hwloc-makefile-fix-ldflags.patch)
sha256sums=('5c4062ce556f6d3451fc177ffb8673a2120f81df6835dea6a21a90fbdfff0dec'
'5030dd260fcc26e4a8f1a222b81276263fb1bbff1b8da761bffc434aa9500439')
prepare() {
cd ${_realname}-${pkgver}
patch -p1 -i "${srcdir}/0001-hwloc-makefile-fix-ldflags.patch"
autoreconf -fiv
}