Browse Source

Improved pkgconfig to be able to cross compile it's internal glib copy

early
Alejandro Mery 17 years ago
parent
commit
de21da8ecd
  1. 87
      base/pkgconfig/glib-configure.patch.cross
  2. 15
      base/pkgconfig/pkgconfig.conf

87
base/pkgconfig/glib-configure.patch.cross

@ -0,0 +1,87 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../pkgconfig/glib-configure.patch.cross
# Copyright (C) 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Sadly not all the tests that don't run while cross compiling can be answered
using config.cache
--- ./glib-1.2.10/configure.orig 2008-02-21 18:53:14.000000000 +0000
+++ ./glib-1.2.10/configure 2008-02-21 20:59:07.000000000 +0000
@@ -20566,11 +20566,8 @@
glib_save_LIBS=$LIBS
LIBS="$LIBS -lm"
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+ { echo "$as_me:$LINENO: result: assuming none" >&5
+echo "${ECHO_T}assuming none" >&6; }
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -28730,11 +28727,11 @@
echo $ECHO_N "checking whether pthread_mutex_trylock is posix like... $ECHO_C" >&6; }
# DCE Threads return 1 as success, posix 0. what a mess.
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: result: assuming yes" >&5
+echo "${ECHO_T}assuming yes" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX 1
+_ACEOF
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -28790,11 +28787,11 @@
echo $ECHO_N "checking whether pthread_cond_timedwait is posix like... $ECHO_C" >&6; }
# DCE Threads return -1 as failure, posix ETIMEDOUT.
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: result: assuming yes" >&5
+echo "${ECHO_T}assuming yes" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD_COND_TIMEDWAIT_POSIX 1
+_ACEOF
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -29063,11 +29060,12 @@
done
echo "return 0; }" >>confrun.c
if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
+rm -f $glib_sysdefso
+for glib_sysdef_input in POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32 ; do
+ echo "#define GLIB_SYSDEF_${glib_sysdef_input/:/=}" >> $glib_sysdefso
+done
+ { echo "$as_me:$LINENO: result: assuming defaults" >&5
+echo "${ECHO_T}assuming defaults" >&6; }
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */

15
base/pkgconfig/pkgconfig.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../pkgconfig/pkgconfig.conf
# Copyright (C) 2006 - 2007 The OpenSDE Project
# Copyright (C) 2006 - 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -12,4 +12,17 @@
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
if atstage cross; then
# hacks to cross compile it's internal glibc 1.2.10
#
# NOTE: sizeof_gmutex=24 is most probably invalid on other architectures
for x in has__inline=yes has__inline__=yes hasinline=yes \
sane_realloc=yes va_copy=yes __va_copy=yes va_val_copy=yes \
rtldglobal_broken=no uscore=no sizeof_gmutex=24
do
var_append configcache ' ' "glib_cv_$x"
done
var_append configcache ' ' 'ac_cv_func_getpwuid_r=yes'
fi
hook_add postmake 5 'cp -vf $confdir/etc_profile.d_pkgconfig.txt $root/etc/profile.d/pkgconfig'

Loading…
Cancel
Save