[rtems-source-builder commit] bare/qemu: Fixes building on FreeBSD

Chris Johns chrisj at rtems.org
Fri May 8 04:34:21 UTC 2020


Module:    rtems-source-builder
Branch:    master
Commit:    955c1c173e02e2ed62fe1cc11b13733700e99bcb
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=955c1c173e02e2ed62fe1cc11b13733700e99bcb

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri May  8 14:28:45 2020 +1000

bare/qemu: Fixes building on FreeBSD

- Move the qemu config to a common file shared by qemu and qemu4.

- Disable nettle on qemu4, FreeBSd complained.

- Add some extra git cleaning steps to the git path. These however
  do not full clean the qemu submodules and it is not worth the
  effort to try and fix.

- The devel/qemu will not build on machines with python set to
  python3. This will not be fixed, use qemu4.

Closes #3966

---

 bare/config/bare-config.cfg             |   2 -
 bare/config/devel/pixman-0.32.4-1.cfg   |   2 +-
 bare/config/devel/qemu-git-1.cfg        |   2 +-
 source-builder/config/qemu-1-1.cfg      | 131 +------------------------------
 source-builder/config/qemu-4-1.cfg      | 130 +-----------------------------
 source-builder/config/qemu-common-1.cfg | 135 ++++++++++++++++++++++++++++++++
 6 files changed, 141 insertions(+), 261 deletions(-)

diff --git a/bare/config/bare-config.cfg b/bare/config/bare-config.cfg
index e042e47..ddf4bcd 100644
--- a/bare/config/bare-config.cfg
+++ b/bare/config/bare-config.cfg
@@ -4,8 +4,6 @@
 
 #
 # The RTEMS http git URL.
-#
-%define rtems_version         4.12
 %define rtems_http_git        http://git.rtems.org
 %define rtems_git_tools       %{rtems_http_git}/rtems-tools/plain/tools/%{rtems_version}
 %define bare_binutils_patches %{rtems_git_tools}/binutils
diff --git a/bare/config/devel/pixman-0.32.4-1.cfg b/bare/config/devel/pixman-0.32.4-1.cfg
index a5aef16..5c572d0 100644
--- a/bare/config/devel/pixman-0.32.4-1.cfg
+++ b/bare/config/devel/pixman-0.32.4-1.cfg
@@ -8,7 +8,7 @@
 
 %include %{_configdir}/base.cfg
 
-%define pixman_version 0.32.4
+%define pixman_version 0.40.0
 %hash sha256 pixman-0.32.4.tar.gz 80c7ed420e8a3ae749800241e6347c3d55681296cab71384be7969cd9e657e84
 
 #
diff --git a/bare/config/devel/qemu-git-1.cfg b/bare/config/devel/qemu-git-1.cfg
index a12799f..5333303 100644
--- a/bare/config/devel/qemu-git-1.cfg
+++ b/bare/config/devel/qemu-git-1.cfg
@@ -23,7 +23,7 @@
 %if %{rsb_released} && %{!defined without_release_url}
  %source set qemu %{rtems_release_url}/%{rtems_version}/sources/qemu-git-42d58e7.tar.xz
 %else
- %source set qemu git://git.qemu-project.org/qemu.git?pull?checkout=%{qemu_version}?submodule=dtc
+ %source set qemu git://git.qemu-project.org/qemu.git?clean=force?pull?checkout=%{qemu_version}?submodule=dtc
 %endif
 
 #
diff --git a/source-builder/config/qemu-1-1.cfg b/source-builder/config/qemu-1-1.cfg
index 178cb5c..5d78f68 100644
--- a/source-builder/config/qemu-1-1.cfg
+++ b/source-builder/config/qemu-1-1.cfg
@@ -4,133 +4,6 @@
 # This configuration file configure's, make's and install's QEMU.
 #
 
-%if %{release} == %{nil}
-%define release 1
-%endif
+%define qemu_disables --disable-smartcard-nss
 
-#
-# Select Snapshot Macro Maps
-#
-%select qemu-snapshot
-
-#
-# The description.
-#
-Name:      qemu-%{qemu_version}-%{_host}-%{release}
-Summary:   Qemu is a simulator of various processors.
-Version:   %{qemu_version}
-Release:   %{release}
-URL: 	   http://www.qemu.org/
-
-#
-# Source
-#
-%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
-
-
-#
-# QEMU Disable component list.
-#
-# We are not interested in the VM use case for qemu and most of that
-# functionality carries host platform baggage which complicates building on a
-# range of host platforms.
-#
-# You can specialise before including this config file.
-#
-#
-%define qemu_std_disables --disable-werror
-%define qemu_std_disables %{qemu_std_disables} --disable-smartcard-nss
-%define qemu_std_disables %{qemu_std_disables} --disable-tools
-%define qemu_std_disables %{qemu_std_disables} --disable-pie
-%define qemu_std_disables %{qemu_std_disables} --disable-vnc
-%define qemu_std_disables %{qemu_std_disables} --disable-sdl
-%define qemu_std_disables %{qemu_std_disables} --disable-gtk
-%define qemu_std_disables %{qemu_std_disables} --disable-opengl
-%define qemu_std_disables %{qemu_std_disables} --disable-netmap
-%ifn %{defined qemu_disables}
- %define qemu_disables %{nil}
-%endif
-%define qemu_disables %{qemu_std_disables} %{qemu_disables}
-
-#
-# QEMU Targets to build.
-#
-%if %{!defined qemu_archs} && %{!defined with_qemu_archs}
- %define qemu_target_list %{nil}
-%else
- %if %{defined with_qemu_archs}
-  %define qemu_target_list --target-list=%{with_qemu_archs}
- %else
-  %define qemu_target_list --target-list=%{qemu_archs}
- %endif
-%endif
-
-#
-# Prepare the source code.
-#
-%prep
-  build_top=$(pwd)
-
-  source_dir_qemu="qemu-%{qemu_version}"
-  %source setup qemu -q -n qemu-%{qemu_version}
-  %patch setup qemu -p1
-
-  cd ${build_top}
-
-%build
-  build_top=$(pwd)
-
-  %{build_directory}
-
-  mkdir -p ${build_dir}
-  cd ${build_dir}
-
-  %if %{pkgconfig check vdeplug}
-    VDE_CONFIG="--enable-vde"
-    VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
-    VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
-  %endif
-
-  %{host_build_flags}
-
-  if test "%{_build}" != "%{_host}" ; then
-    CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
-  fi
-
-  SYSROOT=$SB_TMPPREFIX
-
-  #
-  # The --extra-cflags and --extra-ldflags do not work as expected.
-  #
-  # Hack warning: MSYS2 does not seem to convert the path to
-  #               a shell path from Windows so we keep them
-  #               separate and handle it in the pkgconfig tool.
-  #
-  PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
-  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
-  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
-  %{_ld_library_path}=$SYSROOT/lib \
-  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib -L$SYSROOT/lib ${VDE_LDFLAGS}" \
-  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
-  ../${source_dir_qemu}/configure \
-    --prefix=%{_prefix} \
-    ${CROSS_PREFIX_OPTION} \
-    --make=%{__make} \
-    %{qemu_target_list} \
-    ${VDE_CONFIG} \
-    %{qemu_disables}
-
-  %{_ld_library_path}=$SYSROOT/lib \
-  %{__make} %{?_smp_mflags} all
-
-  cd ${build_top}
-
-%install
-  build_top=$(pwd)
-
-  %{__rmdir} $SB_BUILD_ROOT
-
-  cd ${build_dir}
-  %{_ld_library_path}=$SYSROOT/lib \
-  %{__make} DESTDIR=$SB_BUILD_ROOT install
-  cd ${build_top}
+%include %{_configdir}/qemu-common-1.cfg
diff --git a/source-builder/config/qemu-4-1.cfg b/source-builder/config/qemu-4-1.cfg
index 95d211b..17d75b9 100644
--- a/source-builder/config/qemu-4-1.cfg
+++ b/source-builder/config/qemu-4-1.cfg
@@ -4,132 +4,6 @@
 # This configuration file configure's, make's and install's QEMU.
 #
 
-%if %{release} == %{nil}
-%define release 1
-%endif
+%define qemu_disables --disable-nettle
 
-#
-# Select Snapshot Macro Maps
-#
-%select qemu-snapshot
-
-#
-# The description.
-#
-Name:      qemu-%{qemu_version}-%{_host}-%{release}
-Summary:   Qemu is a simulator of various processors.
-Version:   %{qemu_version}
-Release:   %{release}
-URL: 	   http://www.qemu.org/
-
-#
-# Source
-#
-%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
-
-
-#
-# QEMU Disable component list.
-#
-# We are not interested in the VM use case for qemu and most of that
-# functionality carries host platform baggage which complicates building on a
-# range of host platforms.
-#
-# You can specialise before including this config file.
-#
-#
-%define qemu_std_disables --disable-werror
-%define qemu_std_disables %{qemu_std_disables} --disable-tools
-%define qemu_std_disables %{qemu_std_disables} --disable-pie
-%define qemu_std_disables %{qemu_std_disables} --disable-vnc
-%define qemu_std_disables %{qemu_std_disables} --disable-sdl
-%define qemu_std_disables %{qemu_std_disables} --disable-gtk
-%define qemu_std_disables %{qemu_std_disables} --disable-opengl
-%define qemu_std_disables %{qemu_std_disables} --disable-netmap
-%ifn %{defined qemu_disables}
- %define qemu_disables %{nil}
-%endif
-%define qemu_disables %{qemu_std_disables} %{qemu_disables}
-
-#
-# QEMU Targets to build.
-#
-%if %{!defined qemu_archs} && %{!defined with_qemu_archs}
- %define qemu_target_list %{nil}
-%else
- %if %{defined with_qemu_archs}
-  %define qemu_target_list --target-list=%{with_qemu_archs}
- %else
-  %define qemu_target_list --target-list=%{qemu_archs}
- %endif
-%endif
-
-#
-# Prepare the source code.
-#
-%prep
-  build_top=$(pwd)
-
-  source_dir_qemu="qemu-%{qemu_version}"
-  %source setup qemu -q -n qemu-%{qemu_version}
-  %patch setup qemu -p1
-
-  cd ${build_top}
-
-%build
-  build_top=$(pwd)
-
-  %{build_directory}
-
-  mkdir -p ${build_dir}
-  cd ${build_dir}
-
-  %if %{pkgconfig check vdeplug}
-    VDE_CONFIG="--enable-vde"
-    VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
-    VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
-  %endif
-
-  %{host_build_flags}
-
-  if test "%{_build}" != "%{_host}" ; then
-    CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
-  fi
-
-  SYSROOT=$SB_TMPPREFIX
-
-  #
-  # The --extra-cflags and --extra-ldflags do not work as expected.
-  #
-  # Hack warning: MSYS2 does not seem to convert the path to
-  #               a shell path from Windows so we keep them
-  #               separate and handle it in the pkgconfig tool.
-  #
-  PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
-  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
-  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
-  %{_ld_library_path}=$SYSROOT/lib \
-  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib -L$SYSROOT/lib ${VDE_LDFLAGS}" \
-  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
-  ../${source_dir_qemu}/configure \
-    --prefix=%{_prefix} \
-    ${CROSS_PREFIX_OPTION} \
-    --make=%{__make} \
-    %{qemu_target_list} \
-    ${VDE_CONFIG} \
-    %{qemu_disables}
-
-  %{_ld_library_path}=$SYSROOT/lib \
-  %{__make} %{?_smp_mflags} all
-
-  cd ${build_top}
-
-%install
-  build_top=$(pwd)
-
-  %{__rmdir} $SB_BUILD_ROOT
-
-  cd ${build_dir}
-  %{_ld_library_path}=$SYSROOT/lib \
-  %{__make} DESTDIR=$SB_BUILD_ROOT install
-  cd ${build_top}
+%include %{_configdir}/qemu-common-1.cfg
diff --git a/source-builder/config/qemu-common-1.cfg b/source-builder/config/qemu-common-1.cfg
new file mode 100644
index 0000000..e3f9ca9
--- /dev/null
+++ b/source-builder/config/qemu-common-1.cfg
@@ -0,0 +1,135 @@
+#
+# QEMU Common Version 1.
+#
+# This configuration file configure's, make's and install's QEMU.
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+#
+# Select Snapshot Macro Maps
+#
+%select qemu-snapshot
+
+#
+# The description.
+#
+Name:      qemu-%{qemu_version}-%{_host}-%{release}
+Summary:   Qemu is a simulator of various processors.
+Version:   %{qemu_version}
+Release:   %{release}
+URL: 	   http://www.qemu.org/
+
+#
+# Source
+#
+%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
+
+
+#
+# QEMU Disable component list.
+#
+# We are not interested in the VM use case for qemu and most of that
+# functionality carries host platform baggage which complicates building on a
+# range of host platforms.
+#
+# You can specialise before including this config file.
+#
+#
+%define qemu_std_disables --disable-werror
+%define qemu_std_disables %{qemu_std_disables} --disable-tools
+%define qemu_std_disables %{qemu_std_disables} --disable-pie
+%define qemu_std_disables %{qemu_std_disables} --disable-vnc
+%define qemu_std_disables %{qemu_std_disables} --disable-sdl
+%define qemu_std_disables %{qemu_std_disables} --disable-gtk
+%define qemu_std_disables %{qemu_std_disables} --disable-opengl
+%define qemu_std_disables %{qemu_std_disables} --disable-netmap
+%ifn %{defined qemu_disables}
+ %define qemu_disables %{nil}
+%endif
+%define qemu_disables %{qemu_std_disables} %{qemu_disables}
+
+#
+# QEMU Targets to build.
+#
+%if %{!defined qemu_archs} && %{!defined with_qemu_archs}
+ %define qemu_target_list %{nil}
+%else
+ %if %{defined with_qemu_archs}
+  %define qemu_target_list --target-list=%{with_qemu_archs}
+ %else
+  %define qemu_target_list --target-list=%{qemu_archs}
+ %endif
+%endif
+
+#
+# Prepare the source code.
+#
+%prep
+  build_top=$(pwd)
+
+  source_dir_qemu="qemu-%{qemu_version}"
+  %source setup qemu -q -n qemu-%{qemu_version}
+  %patch setup qemu -p1
+
+  cd ${build_top}
+
+%build
+  build_top=$(pwd)
+
+  %{build_directory}
+
+  mkdir -p ${build_dir}
+  cd ${build_dir}
+
+  %if %{pkgconfig check vdeplug}
+    VDE_CONFIG="--enable-vde"
+    VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
+    VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
+  %endif
+
+  %{host_build_flags}
+
+  if test "%{_build}" != "%{_host}" ; then
+    CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
+  fi
+
+  SYSROOT=$SB_TMPPREFIX
+
+  #
+  # The --extra-cflags and --extra-ldflags do not work as expected.
+  #
+  # Hack warning: MSYS2 does not seem to convert the path to
+  #               a shell path from Windows so we keep them
+  #               separate and handle it in the pkgconfig tool.
+  #
+  PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
+  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
+  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
+  %{_ld_library_path}=$SYSROOT/lib \
+  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib -L$SYSROOT/lib ${VDE_LDFLAGS}" \
+  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
+  ../${source_dir_qemu}/configure \
+    --prefix=%{_prefix} \
+    ${CROSS_PREFIX_OPTION} \
+    --make=%{__make} \
+    %{qemu_target_list} \
+    ${VDE_CONFIG} \
+    %{qemu_disables}
+
+  %{_ld_library_path}=$SYSROOT/lib \
+  %{__make} %{?_smp_mflags} all
+
+  cd ${build_top}
+
+%install
+  build_top=$(pwd)
+
+  %{__rmdir} $SB_BUILD_ROOT
+
+  cd ${build_dir}
+  %{_ld_library_path}=$SYSROOT/lib \
+  %{__make} DESTDIR=$SB_BUILD_ROOT install
+  cd ${build_top}



More information about the vc mailing list