mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
config,sb: Qemu build updates for FreeBSD and the start of MinG32.
Hack round the FreeBSD iconv support in Freebsd 10. In 10 libc now supports iconv however iconv.h is present under /usr/local. Start to add support to build qemu for MinGW via a Cxc. This is a work in progress and contains lots of hidden traps. In config.py separate out of the canadian build status.
This commit is contained in:
20
bare/config/devel/libiconv-1.14-1.cfg
Normal file
20
bare/config/devel/libiconv-1.14-1.cfg
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# Libiconv
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
%include %{_configdir}/base.cfg
|
||||
|
||||
%define libiconv_version 1.14
|
||||
|
||||
#
|
||||
# The Libiconv build instructions. We use 0.x.x Release 1.
|
||||
#
|
||||
%if %{_host} == mingw32
|
||||
%ifn %{check iconv >= %{libiconv_version}}
|
||||
%include %{_configdir}/libiconv-1-1.cfg
|
||||
%endif
|
||||
%endif
|
@@ -23,6 +23,8 @@ Source0: git://git.qemu-project.org/qemu.git?pull?checkout=%{qemu_version}?submo
|
||||
#
|
||||
Patch0: pw://patchwork.ozlabs.org/patch/318435/raw/PULL-29-29-arm-zynq-Add-software-system-reset-via-SCLR.patch
|
||||
|
||||
Patch5: pw://patchwork.ozlabs.org/patch/99999999/raw/qemu-channel-win32-cdecls.patch
|
||||
|
||||
#
|
||||
# The Qemu build instructions. We use 1.x.x Release 1.
|
||||
#
|
||||
|
@@ -11,6 +11,7 @@
|
||||
%define _internal_autotools_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}
|
||||
|
||||
devel/autotools-internal
|
||||
devel/libiconv-1.14-1
|
||||
devel/gettext-0.18.3.1-1
|
||||
devel/libffi-3.0.13-1
|
||||
devel/pixman-0.32.4-1
|
||||
|
@@ -21,6 +21,13 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
#
|
||||
Source0: http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz
|
||||
|
||||
#
|
||||
# Fix the mess iconv is on FreeBSD 10.0.
|
||||
#
|
||||
%if %{defined iconv_optincludes}
|
||||
%define optincludes %{iconv_optincludes}
|
||||
%endif
|
||||
|
||||
#
|
||||
# Prepare the source code.
|
||||
#
|
||||
|
@@ -54,7 +54,7 @@ Source0: http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version_major}/glib-
|
||||
|
||||
SYSROOT=$SB_TMPPREFIX
|
||||
|
||||
PKG_CONFIG_PATH=$SYSROOT \
|
||||
PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
|
||||
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
|
||||
%{_ld_library_path}=$SYSROOT/lib \
|
||||
../${source_dir_0}/configure \
|
||||
|
79
source-builder/config/libiconv-1-1.cfg
Normal file
79
source-builder/config/libiconv-1-1.cfg
Normal file
@@ -0,0 +1,79 @@
|
||||
#
|
||||
# Libiconv 1.x.x Version 1.
|
||||
#
|
||||
# This configuration file configure's, make's and install's libiconv.
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
Name: libiconv-%{libiconv_version}-%{_host}-%{release}
|
||||
Summary: Provides an iconv() implementation, for use on systems which
|
||||
do not have one, or whose implementation cannot convert from/to
|
||||
Unicode.
|
||||
Version: %{libiconv_version}
|
||||
Release: %{release}
|
||||
URL: http://www.gnu.org/software/libiconv/
|
||||
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
|
||||
#
|
||||
# Source
|
||||
#
|
||||
Source0: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-%{libiconv_version}.tar.gz
|
||||
|
||||
#
|
||||
# Prepare the source code.
|
||||
#
|
||||
%prep
|
||||
build_top=$(pwd)
|
||||
|
||||
source_dir_0="libiconv-%{libiconv_version}"
|
||||
%setup -q -n libiconv-%{libiconv_version}
|
||||
%{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
|
||||
%{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
|
||||
%{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
|
||||
%{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
|
||||
%{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
|
||||
%{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
|
||||
%{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
|
||||
%{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
|
||||
%{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
|
||||
%{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
|
||||
|
||||
cd ${build_top}
|
||||
|
||||
%build
|
||||
build_top=$(pwd)
|
||||
|
||||
%{build_directory}
|
||||
|
||||
mkdir -p ${build_dir}
|
||||
cd ${build_dir}
|
||||
|
||||
%{host_build_flags}
|
||||
|
||||
../${source_dir_0}/configure \
|
||||
--prefix=%{_prefix} \
|
||||
--bindir=%{_bindir} \
|
||||
--exec_prefix=%{_exec_prefix} \
|
||||
--includedir=%{_includedir} \
|
||||
--libdir=%{_libdir} \
|
||||
--libexecdir=%{_libexecdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir} \
|
||||
--datadir=%{_datadir} \
|
||||
--build=%{_build} --host=%{_host}
|
||||
|
||||
%{__make} %{?_smp_mflags} all
|
||||
|
||||
cd ${build_top}
|
||||
|
||||
%install
|
||||
build_top=$(pwd)
|
||||
|
||||
%{__rmdir} $SB_BUILD_ROOT
|
||||
|
||||
cd ${build_dir}
|
||||
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
||||
cd ${build_top}
|
@@ -64,7 +64,8 @@ Source0: http://cairographics.org/releases/pixman-%{pixman_version}.tar.gz
|
||||
--infodir=%{_infodir} \
|
||||
--datadir=%{_datadir} \
|
||||
--build=%{_build} --host=%{_host} \
|
||||
--disable-gtk
|
||||
--disable-gtk \
|
||||
--disable-libpng
|
||||
|
||||
%{__make} %{?_smp_mflags} all
|
||||
|
||||
|
@@ -51,14 +51,20 @@ Source0: http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
|
||||
|
||||
%{host_build_flags}
|
||||
|
||||
if test "%{_build}" != "%{_host}" ; then
|
||||
CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
|
||||
fi
|
||||
|
||||
SYSROOT=$SB_TMPPREFIX
|
||||
|
||||
PKG_CONFIG_PATH=$SYSROOT \
|
||||
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" \
|
||||
../${source_dir_0}/configure \
|
||||
--prefix=%{_prefix} \
|
||||
${CROSS_PREFIX_OPTION} \
|
||||
--make=%{__make} \
|
||||
--disable-werror \
|
||||
--disable-tools \
|
||||
--disable-pie \
|
||||
|
3
source-builder/mingw32-pkg-config
Executable file
3
source-builder/mingw32-pkg-config
Executable file
@@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
base=$(dirname $0)
|
||||
exec ${base}/pkg-config --dont-define-prefix $*
|
@@ -83,12 +83,12 @@ def log(s, lf = True):
|
||||
print s,
|
||||
print >> out, s,
|
||||
|
||||
def _check_package(lib_check, args):
|
||||
def _check_package(libraries, args):
|
||||
ec = 1
|
||||
pkg = None
|
||||
flags = { 'cflags': '',
|
||||
'libs': '' }
|
||||
libs = pkgconfig.package.splitter(lib_check)
|
||||
libs = pkgconfig.package.splitter(libraries)
|
||||
for lib in libs:
|
||||
log('pkg: %s' % (lib))
|
||||
pkg = pkgconfig.package(lib[0], prefix = args.prefix, output = log, src = src)
|
||||
@@ -213,6 +213,9 @@ def run(argv):
|
||||
(args.max_version and (args.exists or args.exact_version)):
|
||||
raise error('only one of --exists, --exact-version, or --max-version')
|
||||
|
||||
if args.dont_define_prefix:
|
||||
args.prefix = pkgconfig.default_prefix(False)
|
||||
|
||||
exists = False
|
||||
|
||||
ec = 1
|
||||
@@ -220,8 +223,7 @@ def run(argv):
|
||||
if args.atleast_pkgconfig_version:
|
||||
ec = 0
|
||||
else:
|
||||
for lib in args.libraries:
|
||||
ec, pkg, flags = _check_package(lib, args)
|
||||
ec, pkg, flags = _check_package(args.libraries, args)
|
||||
if ec == 0:
|
||||
if args.cflags:
|
||||
if len(flags['cflags']):
|
||||
|
@@ -287,6 +287,18 @@ class file:
|
||||
return name
|
||||
return '%{' + name.lower() + '}'
|
||||
|
||||
def _cross_compile(self):
|
||||
_host = self.expand('%{_host}')
|
||||
_build = self.expand('%{_build}')
|
||||
return _host != _build
|
||||
|
||||
def _candian_cross_compile(self):
|
||||
_host = self.expand('%{_host}')
|
||||
_build = self.expand('%{_build}')
|
||||
_target = self.expand('%{_target}')
|
||||
_alloc_cxc = self.defined('%{allow_cxc}')
|
||||
return _alloc_cxc and _host != _build and _host != _target
|
||||
|
||||
def _macro_split(self, s):
|
||||
'''Split the string (s) up by macros. Only split on the
|
||||
outter level. Nested levels will need to split with futher calls.'''
|
||||
@@ -369,8 +381,9 @@ class file:
|
||||
return line
|
||||
|
||||
def _pkgconfig_check(self, test):
|
||||
ts = test.split()
|
||||
ok = False
|
||||
if not self._cross_compile():
|
||||
ts = test.split()
|
||||
pkg = pkgconfig.package(ts[0], output = log.output)
|
||||
if len(ts) != 1 and len(ts) != 3:
|
||||
self._error('malformed check')
|
||||
@@ -390,6 +403,7 @@ class file:
|
||||
|
||||
def _pkgconfig_flags(self, package, flags):
|
||||
pkg_flags = None
|
||||
if not self._cross_compile():
|
||||
pkg = pkgconfig.package(package, output = log.output)
|
||||
try:
|
||||
pkg_flags = pkg.get(flags)
|
||||
|
@@ -73,11 +73,16 @@ def load():
|
||||
defines['_build_alias'] = defines['_host_alias']
|
||||
defines['_build_arch'] = defines['_host_arch']
|
||||
|
||||
# FreeBSD 10 and above no longer have /usr/bin/cvs, but it can (e.g.) be installed to /usr/local/bin/cvs through the devel/cvs port
|
||||
# FreeBSD 10 and above no longer have /usr/bin/cvs, but it can (e.g.) be
|
||||
# installed to /usr/local/bin/cvs through the devel/cvs port
|
||||
if int(float(version)) >= 10:
|
||||
cvs = 'cvs'
|
||||
if check.check_exe(cvs, cvs):
|
||||
defines['__cvs'] = cvs
|
||||
#
|
||||
# Fix the mess iconv is on FreeBSD 10.0.
|
||||
#
|
||||
defines['iconv_optincludes'] = ('none', 'none', '-I/usr/local/include -L/usr/local/lib')
|
||||
|
||||
for gv in ['47', '48', '49']:
|
||||
gcc = '%s-portbld-freebsd%s-gcc%s' % (cpu, version, gv)
|
||||
|
@@ -40,14 +40,17 @@ import re
|
||||
import shlex
|
||||
import sys
|
||||
|
||||
def default_prefix():
|
||||
def default_prefix(common = True):
|
||||
paths = []
|
||||
defaults = ['/usr', '/usr/share', '/lib', '/lib64', '/usr/lib', '/usr/lib64', '/usr/local']
|
||||
for d in defaults:
|
||||
if os.path.exists(d):
|
||||
paths += [d]
|
||||
if 'PKG_CONFIG_PATH' in os.environ:
|
||||
paths += os.environ['PKG_CONFIG_PATH'].split(':')
|
||||
if common:
|
||||
defaults = ['/usr', '/usr/share', '/lib', '/lib64', '/usr/lib', '/usr/lib64', '/usr/local']
|
||||
for d in defaults:
|
||||
for cp in package.config_prefixes:
|
||||
prefix = os.path.join(d, cp, 'pkgconfig')
|
||||
if os.path.exists(prefix):
|
||||
paths += [prefix]
|
||||
return paths
|
||||
|
||||
class error(Exception):
|
||||
@@ -79,6 +82,9 @@ class package(object):
|
||||
@staticmethod
|
||||
def splitter(pkg_list):
|
||||
pkgs = []
|
||||
if type(pkg_list) == list:
|
||||
pls = pkg_list
|
||||
else:
|
||||
pls = package.lib_list_splitter.split(pkg_list)
|
||||
i = 0
|
||||
while i < len(pls):
|
||||
@@ -181,10 +187,8 @@ class package(object):
|
||||
else:
|
||||
raise error('invalid type of prefix: %s' % (type(prefix)))
|
||||
for p in self.prefix:
|
||||
for d in package.config_prefixes:
|
||||
prefix = os.path.join(p, d, 'pkgconfig')
|
||||
if os.path.exists(prefix):
|
||||
self.paths += [prefix]
|
||||
if os.path.exists(p):
|
||||
self.paths += [p]
|
||||
self._log('paths: %s' % (', '.join(self.paths)))
|
||||
if 'sysroot' in self.defines:
|
||||
self._log('sysroot: %s' % (self.defines['sysroot']))
|
||||
|
Reference in New Issue
Block a user