From: Hirokazu MORIKAWA Date: Wed, 22 May 2019 06:26:57 +0000 (+0900) Subject: mg: fix arc build fail X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=08f616789a3ad28a0f015a22ce246a77bcd0c62e;p=feed%2Fpackages.git mg: fix arc build fail fix arc (uClibc) build fail Signed-off-by: Hirokazu MORIKAWA --- diff --git a/utils/mg/Makefile b/utils/mg/Makefile index c7965271eb..268c0e5688 100644 --- a/utils/mg/Makefile +++ b/utils/mg/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mg PKG_VERSION:=20180927 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/ibara/mg/releases/download/mg-20180927 diff --git a/utils/mg/patches/001-cross_compile_openwrt.patch b/utils/mg/patches/001-cross_compile_openwrt.patch index dc63ea5983..cd33355a4b 100644 --- a/utils/mg/patches/001-cross_compile_openwrt.patch +++ b/utils/mg/patches/001-cross_compile_openwrt.patch @@ -1,6 +1,7 @@ ---- a/configure -+++ b/configure -@@ -3,53 +3,6 @@ +diff -urN a/configure b/configure +--- a/configure 2018-09-28 01:38:31.000000000 +0900 ++++ b/configure 2019-05-22 15:17:05.722101952 +0900 +@@ -3,52 +3,7 @@ # This configure script written by Brian Callahan # and released into the Public Domain. @@ -50,33 +51,39 @@ - done - return 1 -} -- ++cc="$CC" + fgetlncheck() { cat << EOF > conftest.c - #include -@@ -162,21 +115,6 @@ +@@ -162,18 +117,19 @@ fi } -wflagcheck() { -- cat << EOF > conftest.c ++futimenscheck() { + cat << EOF > conftest.c -int main(void){return 0;} --EOF ++#include ++#include ++int main(void){futimens(0, NULL);return 0;} + EOF - $cc -w -o conftest conftest.c > /dev/null 2> conftest.err - grep ':' conftest.err > /dev/null 2>&1 -- if [ $? -eq 0 ] ; then ++ $cc $tflags -o conftest conftest.c > /dev/null 2>&1 + if [ $? -eq 0 ] ; then - rm -f conftest conftest.err conftest.c - return 1 - else - rm -f conftest conftest.err conftest.c -- return 0 -- fi --} -- - # Option variables - if [ ! -z "$PREFIX" ] ; then - prefix="$PREFIX" -@@ -241,53 +179,9 @@ ++ rm -f conftest conftest.c + return 0 ++ else ++ rm -f conftest conftest.c ++ return 1 + fi + } + +@@ -241,53 +197,9 @@ ldflags="${ldflags}-static" fi @@ -133,3 +140,19 @@ cat << EOF > config.h /* This file generated automatically by configure. */ +@@ -370,6 +282,15 @@ + echo "no" + fi + ++printf "checking for futimens... " ++futimenscheck ++if [ $? -eq 0 ] ; then ++ echo "#define HAVE_FUTIMENS" >> config.h ++ echo "yes" ++else ++ echo "no" ++fi ++ + printf "creating Makefile... " + cat << EOF > Makefile + # This Makefile automatically generated by configure.