On 05/11/11 00:12, Stuart Henderson wrote:
On 2011-05-10, Christopher Zimmermann<madro...@zakweb.de>  wrote:
Anyhow. I changed $(GCC) $(GCJ) from egcc resp. egcj to gcc resp. gcj.
Only $(JAR) had to stay ejar, because there is no ejar, and $(CXX) needs
to be eg++, because gcc 4.2.1 doesn't understand the syntax of pdftk.cc.
Is there a way to tell the gcc4 MODULE to use a specific version of gcc4?

hmm, well one problem is the default include paths for the preprocessor.
the system compiler does not reach into /usr/local for headers automatically,
you have to add it on the command-line. specifically in this case the
following need adding:

-I${LOCALBASE}/lib/gcc/amd64-unknown-openbsd4.9/4.2.4/include
-I${LOCALBASE}/include/c++/4.2.4

(Yes messy, support for other languages via gcc in ports has not
matured yet ;-)

ok, I think now I've finally got it the right and nice way.
Just last little question:

how do I make the 'amd64-unknown-openbsd4.9' part architecture
independent?

Just to test this I build a small Makefile:

MACH!=          uname -m
OSRELEASE!=     uname -r
HOSTDESCR=      "$(MACHINE)-unknown-openbsd$(OSRELEASE)"

all:
        @echo MACH: $(MACH)
        @echo MACHINE: $(MACHINE)
        @echo MACHINE_ARCH: $(MACHINE_ARCH)
        @echo MACHINE_CPU: $(MACHINE_CPU)
        @echo TEST: $(HOSTDESCR)


this will output:

MACH: i386
MACHINE: i386
MACHINE_ARCH: i386
MACHINE_CPU: i386
TEST: i386-unknown-openbsd4.9


now, is this the right way to do this? Does it make any difference
whether I use uname, MACHINE, MACHINE_ARCH or MACHINE_CPU to obtain the
'i386'? Is using uname the right way for getting the 4.9? And last but
not least, will I get problems with the middle part 'unknown'?


systrace builds have a load of denied syscalls, haven't looked at
this yet.

have not tried this yet.

use -pthread not -lpthread, see gcc-local(1).


Thanks a lot for your help so far!

Christopher

Reply via email to