* [ptxdist] Fix missing elf.h on Darwin (v2)
@ 2012-01-24 21:19 Bernhard Walle
2012-01-24 21:19 ` [ptxdist] [PATCH 1/2] Add host-elf-h-compat package Bernhard Walle
2012-01-24 21:19 ` [ptxdist] [PATCH 2/2] kernel: Use host-elf-h-compat Bernhard Walle
0 siblings, 2 replies; 3+ messages in thread
From: Bernhard Walle @ 2012-01-24 21:19 UTC (permalink / raw)
To: ptxdist
This is the second version of the patches. The third patch is not needed any
more because host-elf-h-compat is now built as base package rather than as
dependency. All other remarks of the review have been integrated in the patch
series.
The package is maintained at https://bitbucket.org/bwalle/elf-h-compat but
unfortunately it cannot be downloaded from there automatically because Bitbucket
forwards http to https and that gives certificate errors on some hosts
(depending which certificates are available to wget). That's why I still have my
domain in the source URL of the package. Well, in the past it was much more
reliable compared to Berlios, so it shouldn't be a practical problem.
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ptxdist] [PATCH 1/2] Add host-elf-h-compat package
2012-01-24 21:19 [ptxdist] Fix missing elf.h on Darwin (v2) Bernhard Walle
@ 2012-01-24 21:19 ` Bernhard Walle
2012-01-24 21:19 ` [ptxdist] [PATCH 2/2] kernel: Use host-elf-h-compat Bernhard Walle
1 sibling, 0 replies; 3+ messages in thread
From: Bernhard Walle @ 2012-01-24 21:19 UTC (permalink / raw)
To: ptxdist
This package should provide <elf.h> on host operating systems that have
no /usr/include/elf.h. The header is copied from glibc, modified a bit
to remove GNU dependencies and is sufficient to compile the Linux kernel
and module-init-tools.
The package itself only checks if elf.h is present. If yes, it does
nothing on "make install". If not, it installs its own copy of elf.h in
"make install" to the include directory set in autoconf.
We add this package as base package so that it gets built before the
packages which need it. Also, the package only gets required when
ptxdist is executed not on Linux (per uname -s output). This makes
maintaining the dependencies easier than requiring it in any packages
that need elf.h.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
rules/host-elf-h-compat.in | 5 +++++
rules/host-elf-h-compat.make | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)
create mode 100644 rules/host-elf-h-compat.in
create mode 100644 rules/host-elf-h-compat.make
diff --git a/rules/host-elf-h-compat.in b/rules/host-elf-h-compat.in
new file mode 100644
index 0000000..9310216
--- /dev/null
+++ b/rules/host-elf-h-compat.in
@@ -0,0 +1,5 @@
+## SECTION=hosttools_noprompt
+
+config HOST_ELF_H_COMPAT
+ default y
+ bool
diff --git a/rules/host-elf-h-compat.make b/rules/host-elf-h-compat.make
new file mode 100644
index 0000000..9bd9a1d
--- /dev/null
+++ b/rules/host-elf-h-compat.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Bernhard Walle <bernhard@bwalle.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+LAZY_PACKAGES-$(PTXCONF_HOST_ELF_H_COMPAT) += host-elf-h-compat
+
+#
+# Paths and names
+#
+HOST_ELF_H_COMPAT_VERSION := 0.2
+HOST_ELF_H_COMPAT_MD5 := a2a21551133c9278014f71cdb983564a
+HOST_ELF_H_COMPAT := elf-h-compat-$(HOST_ELF_H_COMPAT_VERSION)
+HOST_ELF_H_COMPAT_SUFFIX := tar.bz2
+HOST_ELF_H_COMPAT_URL := http://bwalle.de/programme/$(HOST_ELF_H_COMPAT).$(HOST_ELF_H_COMPAT_SUFFIX)
+HOST_ELF_H_COMPAT_SOURCE := $(SRCDIR)/$(HOST_ELF_H_COMPAT).$(HOST_ELF_H_COMPAT_SUFFIX)
+HOST_ELF_H_COMPAT_DIR := $(HOST_BUILDDIR)/$(HOST_ELF_H_COMPAT)
+
+#
+# autoconf
+#
+HOST_ELF_H_COMPAT_CONF_TOOL := autoconf
+
+ifneq ($(shell uname -s),Linux)
+$(STATEDIR)/base.prepare: $(STATEDIR)/host-elf-h-compat.install.post
+endif
+
+# vim: syntax=make
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ptxdist] [PATCH 2/2] kernel: Use host-elf-h-compat
2012-01-24 21:19 [ptxdist] Fix missing elf.h on Darwin (v2) Bernhard Walle
2012-01-24 21:19 ` [ptxdist] [PATCH 1/2] Add host-elf-h-compat package Bernhard Walle
@ 2012-01-24 21:19 ` Bernhard Walle
1 sibling, 0 replies; 3+ messages in thread
From: Bernhard Walle @ 2012-01-24 21:19 UTC (permalink / raw)
To: ptxdist
Set the host include flags of the Linux kernel so that it finds elf.h in
sysroot-host/include. It's required to specify HOST_EXTRACFLAGS in the
environment rather than as make argument because otherwise += doesn't
work which ends in other build errors (gettext problems).
See also http://article.gmane.org/gmane.linux.kbuild.devel/5210 for a
discussion about HOST_EXTRACFLAGS.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
rules/kernel.make | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/rules/kernel.make b/rules/kernel.make
index a445182..336b76d 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -43,13 +43,12 @@ KERNEL_SOURCE := $(SRCDIR)/$(KERNEL).$(KERNEL_SUFFIX)
# ----------------------------------------------------------------------------
KERNEL_PATH := PATH=$(CROSS_PATH)
-KERNEL_ENV := KCONFIG_NOTIMESTAMP=1
+KERNEL_ENV := KCONFIG_NOTIMESTAMP=1 HOST_EXTRACFLAGS="$(HOST_CPPFLAGS)"
KERNEL_MAKEVARS := \
$(PARALLELMFLAGS) \
HOSTCC=$(HOSTCC) \
ARCH=$(PTXCONF_KERNEL_ARCH_STRING) \
CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) \
- \
INSTALL_MOD_PATH=$(KERNEL_PKGDIR) \
PTX_KERNEL_DIR=$(KERNEL_DIR) \
$(call remove_quotes,$(PTXCONF_KERNEL_EXTRA_MAKEVARS))
--
1.7.7.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-24 21:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-24 21:19 [ptxdist] Fix missing elf.h on Darwin (v2) Bernhard Walle
2012-01-24 21:19 ` [ptxdist] [PATCH 1/2] Add host-elf-h-compat package Bernhard Walle
2012-01-24 21:19 ` [ptxdist] [PATCH 2/2] kernel: Use host-elf-h-compat Bernhard Walle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox