Skip to content
Snippets Groups Projects
Commit f4233489 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

Merge branch 'fix/andre/alpine-linux-fixes' into 'master'

Fix/andre/alpine linux fixes

See merge request frama-c/frama-c!3216
parents de9009c0 088be41a
No related branches found
No related tags found
No related merge requests found
......@@ -652,7 +652,7 @@ CPPFLAGS="$OLD_CPPFLAGS -m32"
AC_PREPROC_IFELSE(
[AC_LANG_SOURCE([/* Check if preprocessor supports option -m32 */])],
[if test -e conftest.i; then
DEFAULT_CPP_SUPPORTED_ARCH_OPTS+='\"-m32\"; ';
DEFAULT_CPP_SUPPORTED_ARCH_OPTS="$DEFAULT_CPP_SUPPORTED_ARCH_OPTS "'\"-m32\";';
fi], [])
rm -f conftest.i
......@@ -660,7 +660,7 @@ CPPFLAGS="$OLD_CPPFLAGS -m64"
AC_PREPROC_IFELSE(
[AC_LANG_SOURCE([/* Check if preprocessor supports option -m64 */])],
[if test -e conftest.i; then
DEFAULT_CPP_SUPPORTED_ARCH_OPTS+='\"-m64\"; ';
DEFAULT_CPP_SUPPORTED_ARCH_OPTS="$DEFAULT_CPP_SUPPORTED_ARCH_OPTS "'\"-m64\";';
fi], [])
rm -f conftest.i
......@@ -668,13 +668,13 @@ CPPFLAGS="$OLD_CPPFLAGS -m16"
AC_PREPROC_IFELSE(
[AC_LANG_SOURCE([/* Check if preprocessor supports option -m16 */])],
[if test -e conftest.i; then
DEFAULT_CPP_SUPPORTED_ARCH_OPTS+='\"-m16\"; ';
DEFAULT_CPP_SUPPORTED_ARCH_OPTS="$DEFAULT_CPP_SUPPORTED_ARCH_OPTS "'\"-m16\";';
fi], [])
# revert CPPFLAGS to original value
CPPFLAGS=$OLD_CPPFLAGS
AC_MSG_RESULT(Default preprocessor supported architecture-related options: $DEFAULT_CPP_SUPPORTED_ARCH_OPTS)
AC_MSG_RESULT(Default preprocessor supported architecture-related options:$DEFAULT_CPP_SUPPORTED_ARCH_OPTS)
#################
......
......@@ -65,12 +65,15 @@ ifneq (4.0,$(firstword $(sort $(MAKE_VERSION) 4.0)))
$(error This Makefile requires Make >= 4.0 - available at http://ftp.gnu.org/gnu/make/)
endif
# Test if on a Mac (and therefore sed has fewer options)
# Also test if /usr/bin/time is available, otherwise use the shell builtin
# Test if sed has the '--unbuffered' option (GNU sed has, but neither macOS'
# nor Busybox' have it, in which case we ignore it)
SED_UNBUFFERED:=sed$(shell sed --unbuffered //p /dev/null 2>/dev/null && echo " --unbuffered" || true)
# Test if on a Mac;
# test if /usr/bin/time is available, otherwise use the shell builtin
# (which has less options)
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
SED_UNBUFFERED:=sed
ifneq (,$(wildcard /usr/bin/time))
define time_with_output
/usr/bin/time -p
......@@ -81,7 +84,6 @@ define time_with_output
endef
endif
else
SED_UNBUFFERED:=sed --unbuffered
ifneq (,$(wildcard /usr/bin/time))
define time_with_output
/usr/bin/time -f 'user_time=%U\nmemory=%M' -o "$(1)"
......
#!/bin/sh
gcc -C -E -I. -o $3 $2
$1 -q $3
# Note: some versions of dos2unix (e.g. Busybox) do not have a '-q' flag,
# so we avoid using them
$1 $3 >/dev/null 2>/dev/null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment