All of lore.kernel.org
 help / color / mirror / Atom feed
From: riku.voipio@linaro.org
To: linux-kbuild@vger.kernel.org, mmarek@suse.cz,
	debian-kernel@lists.debian.org
Cc: Ben Hutchings <ben@decadent.org.uk>, debian-arm@lists.debian.org
Subject: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture
Date: Thu,  2 Apr 2015 14:27:27 +0300	[thread overview]
Message-ID: <834bd55c0de686780eb15f9a06b13f7fb560e9a8.1427968988.git.riku.voipio@linaro.org> (raw)
In-Reply-To: <cover.1427968988.git.riku.voipio@linaro.org>

From: Ben Hutchings <ben@decadent.org.uk>

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@lists.debian.org
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 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


  reply	other threads:[~2015-04-02 11:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 11:27 [PATCH 0/4] builddeb improvements riku.voipio
2015-04-02 11:27 ` riku.voipio [this message]
2015-04-02 12:01   ` [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture Arnaud Patard
2015-04-02 13:14     ` Riku Voipio
2015-04-02 14:18       ` Michal Marek
2015-04-09  7:43         ` Riku Voipio
2015-04-02 11:27 ` [PATCH 2/4] builddeb: install dtbs riku.voipio
2015-04-02 11:56   ` Arnaud Patard
2015-04-02 12:17     ` Arnaud Patard
2015-04-02 12:29       ` Riku Voipio
2015-04-02 17:46         ` Arnaud Patard
2015-04-02 11:27 ` [PATCH 3/4] builddeb: simplify directory creation riku.voipio
2015-04-02 11:27 ` [PATCH 4/4] RFC: builddeb: add linux-tools package with perf riku.voipio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834bd55c0de686780eb15f9a06b13f7fb560e9a8.1427968988.git.riku.voipio@linaro.org \
    --to=riku.voipio@linaro.org \
    --cc=ben@decadent.org.uk \
    --cc=debian-arm@lists.debian.org \
    --cc=debian-kernel@lists.debian.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.