Browse Source

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."
------------------------------------------------------------------------------
stable/0.6
Christian Wiese 11 years ago
parent
commit
8e660ad6f5
  1. 8
      base/musl/parse-config-9
  2. 19
      base/musl/pkg/m4/m4.conf

8
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

19
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'
Loading…
Cancel
Save