[patch] build fix for non-native sparc builds.
matthew green
mrg@redhat.com
Mon Jan 28 08:14:00 GMT 2002
> hi folks.
>
>
> this fixes builds for non-native sparc targets. "sol2.h" is used
> by lots of targets, and it unconditionally includes <sys/mman.h>
> when building _trampoline.o. the patch below makes sure that
> we aren't also defined(CROSS_COMPILE), which allows my sparc64-elf
> target to build.
Won't this cause cross-compilers to sparc-solaris to fail to create
working trampolines?
not unless <sys/mman.h> does some sort of funny-rename with the
mprotect() symbol -- the code actually uses numbers not symbolic
constants... but the point is well made anyway.
I think you instead want to stop sol2.h from being used when building
a sparc64-elf toolchain. It seems silly to do this since there's
already a sparc/sysv4.h and a sparc/sp64-elf.h, and in fact it looks
like sp64-elf.h spends most of its time overriding nearly everything
that sol2.h did.
could be. there are about a dozen sparc* targets that use sol2.h
that are probably broken like this... fixing them sounds quite
significant. i'll look at sparc-elf and sparc64-elf sometime soon
unless someone else does.
.mrg.
More information about the Gcc-patches
mailing list