Browse Source

Merge pull request #9050 from nxhack/mg_fix_arc_build

mg: fix arc build fail
lilik-openwrt-22.03
Rosen Penev 6 years ago
committed by GitHub
parent
commit
5385c471c9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 18 deletions
  1. +1
    -1
      utils/mg/Makefile
  2. +40
    -17
      utils/mg/patches/001-cross_compile_openwrt.patch

+ 1
- 1
utils/mg/Makefile View File

@ -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


+ 40
- 17
utils/mg/patches/001-cross_compile_openwrt.patch View File

@ -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 <bcallah@openbsd.org>
# and released into the Public Domain.
@ -50,33 +51,39 @@
- done
- return 1
-}
-
+cc="$CC"
fgetlncheck() {
cat << EOF > conftest.c
#include <stdio.h>
@@ -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 <sys/stat.h>
+#include <stddef.h>
+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.

Loading…
Cancel
Save