All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 01/20] Fix util-linux build on MIPS
Date: Sun, 22 Aug 2010 12:51:53 +0200	[thread overview]
Message-ID: <55f70939b839cd5ad826ea01fcb6d363d63ee15d.1282471311.git.thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <cover.1282471311.git.thomas.petazzoni@free-electrons.com>

As reported in bug #635, util-linux doesn't build due to missing
constant definitions related to the a.out binary format. We fix this
by hardcoding these constant definitions, as done in newer versions of
util-linux.

Obviously, the long term fix is to upgrade to util-linux-ng, but this
is probably not acceptable for 2010.08.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...linux-2.13-pre17-hardcode-a-out-constants.patch |   41 ++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch

diff --git a/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch b/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch
new file mode 100644
index 0000000..b115c41
--- /dev/null
+++ b/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch
@@ -0,0 +1,41 @@
+Hardcode a.out related constants
+
+The OMAGIC, NMAGIC and ZMAGIC constants, related to the legacy a.out
+binary format, are no longer available in the headers of all
+architectures, due to this binary format being deprecated. For that
+reason, util-linux fails to build.
+
+We therefore take the approach used in newer versions of
+util-linux-ng: hardcoding those values. See
+http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commitdiff;h=e9eb4dad0ece03914f67f6d1ded74cfbbe694ba4
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ text-utils/more.c |    7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+Index: util-linux-2.13-pre7/text-utils/more.c
+===================================================================
+--- util-linux-2.13-pre7.orig/text-utils/more.c
++++ util-linux-2.13-pre7/text-utils/more.c
+@@ -53,7 +53,6 @@
+ #include <sys/stat.h>
+ #include <sys/file.h>
+ #include <sys/wait.h>
+-#include <a.out.h>
+ #include <locale.h>
+ #include "xstrncpy.h"
+ #include "nls.h"
+@@ -504,9 +503,9 @@
+ 
+ 	if (fread(twobytes, 2, 1, f) == 1) {
+ 		switch(twobytes[0] + (twobytes[1]<<8)) {
+-		case OMAGIC:	/* 0407 */
+-		case NMAGIC:	/* 0410 */
+-		case ZMAGIC:	/* 0413 */
++		case 0407:	/* a.out obj */
++		case 0410:	/* a.out exec */
++		case 0413:	/* a.out demand exec */
+ 		case 0405:
+ 		case 0411:
+ 		case 0177545:
-- 
1.7.0.4

  reply	other threads:[~2010-08-22 10:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22 10:51 [Buildroot] [pull request] Pull request for branch for-2010.08 Thomas Petazzoni
2010-08-22 10:51 ` Thomas Petazzoni [this message]
2010-08-22 10:51 ` [Buildroot] [PATCH 02/20] Add dependency from util-linux on ncurses Thomas Petazzoni
2010-08-22 10:51 ` [Buildroot] [PATCH 03/20] Make uClibc gen_wc8bit shows an error when no locale support available Thomas Petazzoni
2010-08-22 10:51 ` [Buildroot] [PATCH 04/20] Detect early if an UTF-8 locale is needed Thomas Petazzoni
2010-08-22 10:51 ` [Buildroot] [PATCH 05/20] Add the traditional powerpc-link-with-math-lib patch to gcc 4.4.4 Thomas Petazzoni
2010-08-22 10:51 ` [Buildroot] [PATCH 06/20] Mark CRIS architecture as deprecated Thomas Petazzoni
2010-08-22 10:51 ` [Buildroot] [PATCH 07/20] Prevent C++ + locale + uClibc 0.9.31 + gcc 4.2 to be selected Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 08/20] Update busybox 1.17.1 fixes Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 09/20] imagemagick: don't create useless debugging file Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 10/20] libglib2: add patch to rework clock_gettime() test Thomas Petazzoni
2010-08-23  5:42   ` Peter Korsgaard
2010-08-24  7:33     ` Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 11/20] lzo: fix host-lzo build failure when config cache is filled Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 12/20] Bump stable kernel headers Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 13/20] Security bump php to 5.2.14 Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 14/20] netcat: prevent build system from adding a prefix to binaries Thomas Petazzoni
2010-08-23 15:34   ` Peter Korsgaard
2010-08-24  7:31     ` Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 15/20] libxml-parser-perl/intltool: mark as host only packages Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 16/20] Add new patches Lua upstream patches rename old ones Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 17/20] luafilesystem: remove LARGE_FILE constraint Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 18/20] lua: make sure that CFLAGS are passed Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 19/20] sysvinit: make sure to link against libcrypt Thomas Petazzoni
2010-08-22 10:52 ` [Buildroot] [PATCH 20/20] sysvinit: remove unneeded dependency on ncurses Thomas Petazzoni
2010-08-22 19:52 ` [Buildroot] [pull request] Pull request for branch for-2010.08 Peter Korsgaard
2010-08-25 15:12 ` Peter Korsgaard

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=55f70939b839cd5ad826ea01fcb6d363d63ee15d.1282471311.git.thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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.