Re: [PATCH 3/4] Android: clean up the bypass ifdeffery
From: Henrik Austad <hidden>
Date: 2015-10-07 11:17:35
On Wed, Oct 07, 2015 at 12:34:11PM +0200, John Kacur wrote:
On Tue, 6 Oct 2015, Henrik Austad wrote:quoted
88af643971b9 (android: adjust target for android) introduced some really ugly ifdefs to avoid calling into pthread_barrier_wait and pthread_barrier_init. This patch attempts to coalesce this into a single place and let the compiler handle the linking so that cyclictest.c is untouched by evil ifdefs. Compiled and tested on: - x86_64 (v3.13 kernel) - tilegx (v3.10 kernel) - arm64 android (v3.10 kernel) Signed-off-by: Henrik Austad <redacted> Cc: Clark Williams <redacted> Cc: John Kacur <jkacur@redhat.com> --- Makefile | 2 +- include/bionic.h | 32 ++++++++++++++++++++++++++++++++ src/arch/bionic/Makefile | 4 +--- src/cyclictest/cyclictest.c | 25 +++---------------------- 4 files changed, 37 insertions(+), 26 deletions(-) create mode 100644 include/bionic.hdiff --git a/Makefile b/Makefile index 2d20ea4..24ef8fe 100644 --- a/Makefile +++ b/Makefile@@ -22,7 +22,7 @@ bindir ?= $(prefix)/bin mandir ?= $(prefix)/share/man srcdir ?= $(prefix)/src -CFLAGS ?= -Wall -Wno-nonnull +CFLAGS ?= -Wall -Wno-nonnull -Iinclude/ CPPFLAGS += -D_GNU_SOURCE -Isrc/includeWe already have an include dir. Why aren't you using it? If you think it would be cleaner to create your own include dir, you at least have to put it some where in the src dir
You're right! moving it to src/include/ now, do you want a new patch right away, or shall I wait for v0.96-devel before submitting? -- Henrik Austad TIPBU Eng Cisco Systems Norway