Commit 8d5390c4 ("libhugetlbfs: Remove segment-based alignment restrictions") defined the CPPFLAG PPC_NO_SEGMENTS, because BookE Freescale processors don't have this restriction. However it is defined globally and thus is also applied to 32-bit builds on pseries hardware. This is simply incorrect and breaks the 32-bit malloc testcases (which fail to align the heap address correctly) on ppc64, because there is no situation where PPC_NO_SEGMENTS is not defined.
I believe the right fix is to only define this flag when we are on a natively 32-bit platform. With this change, the malloc testcase pass again. Signed-off-by: Nishanth Aravamudan <n...@linux.vnet.ibm.com> diff --git a/Makefile b/Makefile index ccd9a3f..145b53d 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ INSTALL = install LDFLAGS += -Wl,-z,noexecstack -ldl CFLAGS ?= -O2 -g CFLAGS += -Wall -fPIC -CPPFLAGS += -D__LIBHUGETLBFS__ -DPPC_NO_SEGMENTS +CPPFLAGS += -D__LIBHUGETLBFS__ ARCH = $(shell uname -m | sed -e s/i.86/i386/) CC = gcc @@ -57,6 +57,7 @@ ifeq ($(ARCH),ppc) CC32 = $(CC) -m32 ELF32 = elf32ppclinux TMPLIB32 = lib +CPPFLAGS += -DPPC_NO_SEGMENTS else ifeq ($(ARCH),armv7l) CC32 = $(CC) ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel