mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Fix missing elf.h on Darwin
@ 2012-01-22 11:43 Bernhard Walle
  2012-01-22 11:43 ` [ptxdist] [PATCH 1/3] Add host-elf-h-compat package Bernhard Walle
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bernhard Walle @ 2012-01-22 11:43 UTC (permalink / raw)
  To: ptxdist

This patch series is an attempt to solve the problem that Darwin has no
/usr/include/elf.h. I'm sure that other non-Linux but POSIX-compatible operating
systems have no /usr/include/elf.h, so it should not only increase portability
for Mac OS but also for *BSD.

I think there are various ways to implement an solution, this one is based on a
newly created elf-h-compat package that uses autoconf to check if there's
already a elf.h present and if yes, it does nothing on "make install".
Otherwise, an own copy of elf.h that is sufficient to compile the kernel and
module-init-tools is installed, which results in sysroot-host/include/elf.h.

The rest of the patches just add the dependencies and set the CFLAGS.

Some words on alternatives: I played a bit with libelf to provide the required
headers, but they don't have elf.h and even a compat-elf.h that includes gelf.h
doesn't bring all required defines. On the other side building libelf just to
get a few definitions is overkill.

Modifying the kernel build system to use its own copy of elf.h (basically
<linux/elf.h>) isn't easy either and will not help module-init-tools (didn't
check kmod).

Using the elf.h from the cross-toolchain would involve bringing the include path
of the cross toolchain in the include path of the host which I'm sure will
generate more problems.

Of course I'm open for alternatives, but discussion without suggesting a
solution doesn't work in most Open Source projects. ;-)


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-24  9:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-22 11:43 [ptxdist] Fix missing elf.h on Darwin Bernhard Walle
2012-01-22 11:43 ` [ptxdist] [PATCH 1/3] Add host-elf-h-compat package Bernhard Walle
2012-01-24  7:53   ` Michael Olbrich
2012-01-22 11:43 ` [ptxdist] [PATCH 2/3] kernel: Use host-elf-h-compat Bernhard Walle
2012-01-24  9:43   ` Michael Olbrich
2012-01-22 11:43 ` [ptxdist] [PATCH 3/3] module-init-tools: Depend on 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