Solved [Solved] Compiler flags differ when running port Makefile

I am putting together a port and unfortunately the do-build target is failing. The software compiles fine if I run GNU make from a shell. I have traced this to a difference in the compiler flags when building with the port Makefile; an include relating the architecture is missing. An example from a diff (note the additional -I ../Include/X64/ when I run gmake from the shell):
Code:
< gcc  -c -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib -Wall -Werror -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I .   GnuGenBootSector.c -o GnuGenBootSector.o
> gcc  -c -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib -Wall -Werror -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  GnuGenBootSector.c -o GnuGenBootSector.o
I am at a bit of a loss as to how to investigate further what is causing the issue. I considered fixing it by manually adding back the missing include to CCFLAGS and CPPFLAGS depending on the value of ${ARCH}, but that doesn't seem right and furthermore I have only been able to generate "Malformed conditional" errors when trying to use the .if ${ARCH} == foo construct. The software uses recursive make :\ Can anyone suggest where to look?
 
Re: [Solved] Compiler flags differ when running port Makefil

I tracked down the issue to one of the ported code's makefiles. It expects the value of ARCH to be IA32 and X64, rather than i386 and amd64 respectively. The inclusion was conditional on the value of ARCH. I've patched the guilty file and it appears to be working. On to the next hurdle...
 
Back
Top