[packages/ice] - override build platform (project uses uname -m :/)

baggins baggins at pld-linux.org
Mon Apr 20 17:03:58 CEST 2026


commit cf9d5e158d917b3a1977cc176b8c64fd62d50200
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 20 19:03:13 2026 +0200

    - override build platform (project uses uname -m :/)

 ice.spec           |  8 ++++++-
 no-arch-opts.patch | 65 ++++++++++++++++--------------------------------------
 2 files changed, 26 insertions(+), 47 deletions(-)
---
diff --git a/ice.spec b/ice.spec
index 78f2b39..acccd3c 100644
--- a/ice.spec
+++ b/ice.spec
@@ -217,7 +217,7 @@ Pakiet uruchomieniowy Ice dla aplikacji w PHP.
 
 %prep
 %setup -q -a1
-#patch -P0 -p1
+%patch -P0 -p1
 %patch -P1 -p1
 
 # update path to our install
@@ -241,6 +241,7 @@ javac cpp/src/ca/ImportKey.java
 	CFLAGS="%{rpmcflags} -fPIC" \
 	CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
 	GCC_COMPILER=yes \
+	build-platform=%{_arch} \
 %ifarch x32
 	lp64suffix=x32 \
 %endif
@@ -264,6 +265,7 @@ export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
 	CXX="%{__cxx}" \
 	CFLAGS="%{rpmcflags} -fPIC" \
 	CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+	build-platform=%{_arch} \
 %ifarch x32
 	lp64suffix=x32 \
 %endif
@@ -274,6 +276,7 @@ export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
 %{__make} -C csharp \
 	V=1 \
 	MCS=dmcs \
+	build-platform=%{_arch} \
 %ifarch x32
 	lp64suffix=x32 \
 %endif
@@ -287,6 +290,7 @@ export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
 	CXX="%{__cxx}" \
 	CFLAGS="%{rpmcflags} -fPIC" \
 	CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+	build-platform=%{_arch} \
 %ifarch x32
 	lp64suffix=x32 \
 %endif
@@ -300,6 +304,7 @@ export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
 	CXX="%{__cxx}" \
 	CFLAGS="%{rpmcflags} -fPIC" \
 	CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+	build-platform=%{_arch} \
 %ifarch x32
 	lp64suffix=x32 \
 %endif
@@ -312,6 +317,7 @@ export CLASSPATH=$(build-classpath db jgoodies-forms jgoodies-looks)
 	PHP_HOME=%{_prefix} \
 	CFLAGS="%{rpmcflags} -fPIC" \
 	CXXFLAGS="%{rpmcxxflags} -fPIC -pthread" \
+	build-platform=%{_arch} \
 %ifarch x32
 	lp64suffix=x32 \
 %endif
diff --git a/no-arch-opts.patch b/no-arch-opts.patch
index a95c10e..b6bb970 100644
--- a/no-arch-opts.patch
+++ b/no-arch-opts.patch
@@ -1,48 +1,21 @@
---- ice-3.6.3/cpp/config/Make.rules.Linux.orig	2016-10-05 16:59:08.000000000 +0200
-+++ ice-3.6.3/cpp/config/Make.rules.Linux	2017-06-28 16:32:48.328625292 +0200
-@@ -79,18 +79,6 @@
-         CXXARCHFLAGS	+= -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED
-     endif
+--- ice-3.8.1/config/Make.rules.Linux~	2026-04-20 18:57:56.000000000 +0200
++++ ice-3.8.1/config/Make.rules.Linux	2026-04-20 19:01:20.096672176 +0200
+@@ -35,14 +35,14 @@
+ # Targeting x86-64-v2, compatible with most x86-64 processors. This matches the defaults in RHEL 9 x86-64 builds.
+ # https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level
  
--    #
--    # Only use multilib -m32/-m64 options for amd64 arch, x32 arch can also run
--    # in amd64 macines but doesn't use multilib, in this case MACHINE_TYPE will
--    # be x86_64 and HOST_ARCH x32.
--    #
--    ifeq ($(HOST_ARCH),amd64)
--        ifeq ($(LP64),yes)
--            CXXARCHFLAGS	+= -m64
--        else
--            CXXARCHFLAGS	+= -m32
--        endif
--    endif
+-x64_cppflags            := $(call opt-cppflags,x86_64) -m64 -march=x86-64-v2
+-x64_ldflags             := $(call opt-ldflags,x86_64) -m64
++x64_cppflags            := $(call opt-cppflags,x86_64)
++x64_ldflags             := $(call opt-ldflags,x86_64)
+ x64_targetdir           = $(if $(filter %/build,$5),/x64,$(if $(filter-out $($1_target),program),64))
+ x64_installdir          = $(if $(and $(filter-out $($1_target),program),$(if $5,$(filter-out %64,$5),true)),64)
+ x64_cmakedir            = /cmake
  
-     CXXFLAGS		+= $(CXXARCHFLAGS) -fvisibility=hidden -Wall -Werror -pthread
- 
---- ice-3.6.3/config/Make.common.rules.orig	2016-10-05 16:59:08.000000000 +0200
-+++ ice-3.6.3/config/Make.common.rules	2017-06-28 16:40:31.135286671 +0200
-@@ -102,24 +102,8 @@
-           LP64      	= yes
-       endif
- 
--      #
--      # x86 binaries build on x86_64 machine use 32 binsuffix
--      #
--      ifneq ($(STATICLIBS),yes)
--          ifneq ($(LP64),yes)
--              binsuffix	= 32
--          endif
--      endif
-    endif
- 
--   #
--   # x86 builds uses 32 binsuffix
--   #
--   ifneq ($(STATICLIBS),yes)
--	ifeq ($(findstring $(MACHINE_TYPE),i386 i486 i586 i686),$(MACHINE_TYPE))
--	    binsuffix     = 32
--	endif
--    endif
- endif
- 
- ifeq ($(CPP11),yes)
+-x86_cppflags            := $(call opt-cppflags,i386) -m32 -march=x86-64-v2
+-x86_ldflags             := $(call opt-ldflags,i386) -m32
++x86_cppflags            := $(call opt-cppflags,i386)
++x86_ldflags             := $(call opt-ldflags,i386)
+ x86_targetdir           = $(if $(filter %/build,$5),/x86)
+ x86_targetname          = $(if $(is-bin-program),32)
+ x86_cmakedir            = /cmake
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ice.git/commitdiff/cf9d5e158d917b3a1977cc176b8c64fd62d50200



More information about the pld-cvs-commit mailing list