summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/Do-not-ignore-predefine-flags.patch29
-rw-r--r--packaging/corefx.spec45
2 files changed, 63 insertions, 11 deletions
diff --git a/packaging/Do-not-ignore-predefine-flags.patch b/packaging/Do-not-ignore-predefine-flags.patch
new file mode 100644
index 0000000000..22d24dd170
--- /dev/null
+++ b/packaging/Do-not-ignore-predefine-flags.patch
@@ -0,0 +1,29 @@
+From 708a7646a9f3fb8e9b0aa6560860d7a29b1eeac7 Mon Sep 17 00:00:00 2001
+From: Jiyoung Yun <jy910.yun@samsung.com>
+Date: Tue, 21 Mar 2017 18:48:43 +0900
+Subject: [PATCH] Do not ignore predefine flags
+
+The CMAKE_CXX_FLAGS may have content that comes from outside CMakeLists.
+The existing line destroys those settings silently.
+---
+ src/Native/Unix/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Native/Unix/CMakeLists.txt b/src/Native/Unix/CMakeLists.txt
+index c6dcc8e..39d68bc 100644
+--- a/src/Native/Unix/CMakeLists.txt
++++ b/src/Native/Unix/CMakeLists.txt
+@@ -4,8 +4,8 @@ project(CoreFX)
+ set(CMAKE_MACOSX_RPATH ON)
+ set(CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir})
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+-set(CMAKE_C_FLAGS "-std=c11")
+-set(CMAKE_CXX_FLAGS "-std=c++11")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_SHARED_LIBRARY_PREFIX "")
+ set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/../../version.c")
+
+--
+1.9.1
+
diff --git a/packaging/corefx.spec b/packaging/corefx.spec
index 67dcdc1d5d..eecd0be523 100644
--- a/packaging/corefx.spec
+++ b/packaging/corefx.spec
@@ -4,7 +4,7 @@
%endif
%define _binaries_in_noarch_packages_terminate_build 0
-%ifarch x86_64
+%ifarch x86_64 %{ix86}
%define skipnative 0
%define skipmanaged 0
%else
@@ -36,9 +36,10 @@ Source1001: %{name}.manifest
Source1002: libicu.tar.gz
Source1003: dep_libs.tar.gz
Source1004: runtime_nupkgs.tar.gz
-# Gbp-Ignore-Patches: 0 1
+# Gbp-Ignore-Patches: 0 1 2
patch0: Add-project.lock.json-files.patch
patch1: Do-not-use-test-runtime.depproj-and-dotnet-myget-sou.patch
+patch2: Do-not-ignore-predefine-flags.patch
%if 0%{skipnative} && 0%{skipmanaged}
%else
@@ -57,6 +58,16 @@ BuildRequires: mscorlib
%ifarch armv7l
BuildRequires: patchelf
%endif
+%ifarch %{ix86}
+BuildRequires: patchelf
+BuildRequires: glibc-64bit
+BuildRequires: libgcc-64bit
+BuildRequires: libstdc++-64bit
+BuildRequires: libunwind-64bit
+BuildRequires: libuuid-64bit
+BuildRequires: zlib-64bit
+BuildRequires: libopenssl-64bit
+%endif
%endif
%description
@@ -73,7 +84,6 @@ Requires: mscorlib
%else
BuildRequires: cmake
BuildRequires: llvm >= 3.8
-BuildRequires: libllvm >= 3.6
BuildRequires: llvm-devel >= 3.8
BuildRequires: clang >= 3.8
BuildRequires: clang-devel >= 3.8
@@ -81,7 +91,8 @@ BuildRequires: lldb >= 3.8
BuildRequires: lldb-devel >= 3.8
BuildRequires: gettext-tools
BuildRequires: libopenssl-devel
-
+# C include headers
+BuildRequires: libstdc++-devel
# for System.Net.Http.Native.so
BuildRequires: krb5-devel
BuildRequires: libcurl-devel
@@ -134,16 +145,17 @@ cp %{SOURCE1001} .
# Gbp-Patch-Macros
%patch0 -p1
%patch1 -p1
+%patch2 -p1
cp %{SOURCE1000} ./
tar xf %{SOURCE1000}
%setup -T -D -a 1004
-%ifarch armv7l
+%ifarch armv7l %{ix86}
%setup -T -D -a 1002
%setup -T -D -a 1003
+%ifarch armv7l
# Detect interpreter name from cross-gcc
LD_INTERPRETER=$(patchelf --print-interpreter /emul/usr/bin/gcc)
LD_RPATH=$(patchelf --print-rpath /emul/usr/bin/gcc)
-
for file in $( find ./Tools -name "dotnet" )
do
patchelf --set-interpreter ${LD_INTERPRETER} ${file}
@@ -154,6 +166,13 @@ do
patchelf --set-rpath ${LD_RPATH}:%{_builddir}/%{name}-%{version}/libicu/ ${file}
done
%endif
+%ifarch %{ix86}
+for file in $( find ./Tools ./libicu -iname "*.so" -or -iname "*.so.*" )
+do
+ patchelf --set-rpath %{_builddir}/%{name}-%{version}/libicu/ ${file}
+done
+%endif
+%endif
%endif
%build
@@ -175,10 +194,10 @@ export CLANG_HEADERS=$(clang++ -print-search-dirs 2>&1 | sed -ne '/libraries: /s
%else
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${LLVM_LIBDIR}:${GCC_INSTALL_DIR}
export LIBRARY_PATH=$LIBRARY_PATH:${LLVM_LIBDIR}:${GCC_INSTALL_DIR}
-export CFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations "
-export CPPFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations "
-export CXXFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations "
-export LDFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations "
+export CFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations -D__extern_always_inline=inline"
+export CPPFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations -D__extern_always_inline=inline"
+export CXXFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations -D__extern_always_inline=inline"
+export LDFLAGS=" -B${LLVM_LIBDIR} -B${GCC_INSTALL_DIR} -Wno-deprecated-declarations -D__extern_always_inline=inline"
export CPLUS_INCLUDE_PATH="${GPP_INCLUDE_PATHS}:${LLVM_INCLUDEDIR}/llvm/:${LLVM_INCLUDEDIR}/llvm-c/:${CLANG_HEADERS}:${GPP_INCLUDE_PATHS}:${CLANG_INCLUDE_PATHS}"
export C_INCLUDE_PATH="${LLVM_INCLUDEDIR}/llvm-c/:%{_includedir}"
%endif
@@ -193,7 +212,7 @@ export C_INCLUDE_PATH="${LLVM_INCLUDEDIR}/llvm-c/:%{_includedir}"
%define _barch arm64
%else
-%ifarch i586
+%ifarch %{ix86}
%define _barch x86
%else
@@ -222,6 +241,10 @@ export CXXFLAGS="${CXXFLAGS} -U__GNUC_MINOR__ -D__GNUC_MINOR__=3 -O2 --param=ssp
%else
# Build native only.
./build-native.sh -%{buildtype} -buildArch=%{_barch} -- clang3.8
+%ifarch %{ix86}
+mkdir -p bin/Linux.x64.%{buildtype}/native
+cp -rf %{_reldir}/native/* bin/Linux.x64.%{buildtype}/native/
+%endif
%endif
%if 0%{skipmanaged}