Build GMP as a fat library to support older CPUs
--enable-fat selects the optimized code at run time, so the static library also works on x86_64 CPUs without AVX, BMI2 or ADX. It is ignored on architectures that do not support it, such as aarch64. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
729ada5769
commit
7f5012dd94
3 files changed
+3
-3
No files matched your search
@@ -461,7 +461,7 @@ RUN --mount=type=bind,from=sources,source=gmp-6.3.0.tar.xz,target=/tmp/gmp.tar.x
|
||||
mkdir src \
|
||||
&& tar --extract --xz --file=/tmp/gmp.tar.xz --directory=src --strip-components=1 \
|
||||
&& cd src \
|
||||
&& CFLAGS="-fPIC -std=gnu17" ./configure --prefix=/usr/local --disable-shared --enable-static \
|
||||
&& CFLAGS="-fPIC -std=gnu17" ./configure --prefix=/usr/local --disable-shared --enable-static --enable-fat \
|
||||
&& make --jobs="$(nproc)" \
|
||||
&& make install \
|
||||
&& cd .. \
|
||||
|
||||
+1
-1
@@ -567,7 +567,7 @@ RUN --mount=type=bind,from=sources,source=gmp-6.3.0.tar.xz,target=/tmp/gmp.tar.x
|
||||
mkdir src \
|
||||
&& tar --extract --xz --file=/tmp/gmp.tar.xz --directory=src --strip-components=1 \
|
||||
&& cd src \
|
||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib/$(gcc -dumpmachine) --disable-shared --enable-static \
|
||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib/$(gcc -dumpmachine) --disable-shared --enable-static --enable-fat \
|
||||
&& make --jobs="$(nproc)" \
|
||||
&& make install \
|
||||
&& cd .. \
|
||||
|
||||
+1
-1
@@ -547,7 +547,7 @@ RUN --mount=type=bind,from=sources,source=gmp-6.3.0.tar.xz,target=/tmp/gmp.tar.x
|
||||
mkdir src \
|
||||
&& tar --extract --xz --file=/tmp/gmp.tar.xz --directory=src --strip-components=1 \
|
||||
&& cd src \
|
||||
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --disable-shared --enable-static \
|
||||
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --disable-shared --enable-static --enable-fat \
|
||||
&& make --jobs="$(nproc)" \
|
||||
&& make install \
|
||||
&& cd .. \
|
||||
|
||||
Reference in new issue
Block a user