From 8e660ad6f5e94d2957d3655e33c6695f3334f900 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Tue, 27 Aug 2013 23:07:00 +0200 Subject: [PATCH] musl: fixed m4 to cross-compile and to workaround gnulib weirdness Note: If you see something like this while trying to build a package using musl libc this kind of fix might also apply for that package! ------------------------------------------------------------------------------ freadahead.c: In function 'freadahead': freadahead.c:83:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, th en report this to bug-gnulib." ------------------------------------------------------------------------------ --- base/musl/parse-config-9 | 8 ++++++++ base/musl/pkg/m4/m4.conf | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 base/musl/pkg/m4/m4.conf diff --git a/base/musl/parse-config-9 b/base/musl/parse-config-9 index 5e8581f02..177dc81fe 100644 --- a/base/musl/parse-config-9 +++ b/base/musl/parse-config-9 @@ -79,6 +79,8 @@ if [ "$SDECFG_LIBC" == "musl" ]; then musl_fix_gnulib() { local dir="$1" + echo_status "fixing gnulib weirdness in $dir" + gl_config_cache=" gl_cv_func_isnanl_works=yes \ gl_cv_header_working_stdint_h=yes \ @@ -168,6 +170,12 @@ if [ "$SDECFG_LIBC" == "musl" ]; then libtool) hook_add preconf 9 'musl_findall_fix_configsub' ;; + + # packages to fix gnulib weirdness + m4) + hook_add preconf 9 'musl_fix_gnulib lib' + ;; + esac # same package translations to look for patches diff --git a/base/musl/pkg/m4/m4.conf b/base/musl/pkg/m4/m4.conf new file mode 100644 index 000000000..cf12c00e5 --- /dev/null +++ b/base/musl/pkg/m4/m4.conf @@ -0,0 +1,19 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../musl/pkg/m4/m4.conf +# Copyright (C) 2013 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +# avoid undefined reference to `rpl_fseeko' in `rpl_fflush' +# by simply using the functions provided by the libc +var_append CFLAGS ' ' "-Drpl_fflush=fflush" +var_append CFLAGS ' ' "-Drpl_fseeko=fseeko" +var_append configprefix ' ' 'CFLAGS=$CFLAGS'