[PATCH 1/4] deb-pkg: Add automatic support for armhf architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Hutchings <ben@xxxxxxxxxxxxxxx>

The Debian armhf architecture uses the ARM EABI hard-float variant,
whereas armel uses the soft-float variant.  If the compiler used
to compile the kernel uses the __ARM_PCS_VFP ABI, the compiler
targets armhf architecture.

v3 by Riku: Use gcc define instead of CONFIG_VFP

Cc: debian-arm@xxxxxxxxxxxxxxxx
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Signed-off-by: Riku Voipio <riku.voipio@xxxxxxxxxx>
---
 scripts/package/builddeb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 88dbf23..146b74f 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -45,7 +45,16 @@ create_package() {
 	arm64)
 		debarch=arm64 ;;
 	arm*)
-		debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
+		if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
+			if $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then
+				debarch=armhf
+			else
+				debarch=armel
+			fi
+		else
+			debarch=arm
+		fi
+		;;
 	*)
 		echo "" >&2
 		echo "** ** **  WARNING  ** ** **" >&2
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux