sed: fix compilation on FreeBSD/AMD64
[openwrt/staging/yousong.git] / tools / sed / patches / 010-amd64_freebsd_build.patch
diff --git a/tools/sed/patches/010-amd64_freebsd_build.patch b/tools/sed/patches/010-amd64_freebsd_build.patch
new file mode 100644 (file)
index 0000000..c40cafb
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/config/config.sub
++++ b/config/config.sub
+@@ -380,6 +380,9 @@ case $basic_machine in
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
++      amd64-*)
++              basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
++              ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv