diff options
author | edwin <edwin@FreeBSD.org> | 2006-01-03 04:12:50 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2006-01-03 04:12:50 +0800 |
commit | 64dc373e9f312923378ee8f61078af46aed7fa5e (patch) | |
tree | e963963d6a89d449ee41fa1ae615490f98faafb4 /devel | |
parent | 42f3a6dc6d5be1169ba68866a5ce5861e5f96386 (diff) | |
download | freebsd-ports-gnome-64dc373e9f312923378ee8f61078af46aed7fa5e.tar.gz freebsd-ports-gnome-64dc373e9f312923378ee8f61078af46aed7fa5e.tar.zst freebsd-ports-gnome-64dc373e9f312923378ee8f61078af46aed7fa5e.zip |
[PATCH] devel/ode and devel/ode-devel: unbreak on 64bit platforms
devel/ode and devel/ode-devel ports are marked broken on
non-i386 archs (i.e. amd64, ia64), because ode fail to build
on these systems with following errors:
c++ -Iinclude -c -fno-exceptions -fomit-frame-pointer -O -pipe -I/usr/X11R6/include
+-DdNODEBUG -o ode/src/timer.o ode/src/timer.cpp
{standard input}: Assembler messages:
{standard input}:62: Error: `(%esi)' is not a valid 64 bit base/index expression
{standard input}:63: Error: `4(%esi)' is not a valid 64 bit base/index expression
{standard input}:86: Error: `(%esi)' is not a valid 64 bit base/index expression
{standard input}:87: Error: `4(%esi)' is not a valid 64 bit base/index expression
{standard input}:172: Error: `(%esi)' is not a valid 64 bit base/index expression
{standard input}:173: Error: `4(%esi)' is not a valid 64 bit base/index expression
{standard input}:194: Error: `(%esi)' is not a valid 64 bit base/index expression
{standard input}:195: Error: `4(%esi)' is not a valid 64 bit base/index expression
{standard input}:234: Error: `(%esi)' is not a valid 64 bit base/index expression
{standard input}:235: Error: `4(%esi)' is not a valid 64 bit base/index expression
gmake: *** [ode/src/timer.o] Error 1
*** Error code 2
Stop in /usr/ports/devel/ode.
After some investigation, I think I've solved the problem,
and it would be great to unbreak ode at last.
The build on 64 bit platforms fails because some 32 bit
assembly gets included in the ode/src/timer.cpp file.
That, on it's turn, happens because ode's configurator
(simple configure analogue written in C) has too weak
checking for `pentium compatibility' of host system - it
just tries to compile following assembly code: `mov $0,
%eax' as a test. That compiles well on 64 bit platforms,
but because addressing scheme is now 64bit, above-mentioned
errors occur when compiling ode's source itself.
The fix is to add a patch to configurator.c that makes
`pentium compatibility' test more strict. Thus, test will
fail on 64 bit ystems and i386 assembly won't be used (ode
will use more portable routines instead).
This patch is not well tested, as I myself have no 64 bit
machines in the vicinity, but it surely doesn't break ode
on x86 :)
I've mailed it to ode author, it's now also in ODE's CVS.
PR: ports/90077
Submitted by: Dmitry Marakasov <amdmi3@mail.ru>
Approved by: maintainer timeout
Diffstat (limited to 'devel')
-rw-r--r-- | devel/ode-devel/Makefile | 4 | ||||
-rw-r--r-- | devel/ode-devel/files/patch-configurator.c | 11 | ||||
-rw-r--r-- | devel/ode/Makefile | 4 | ||||
-rw-r--r-- | devel/ode/files/patch-configurator.c | 11 |
4 files changed, 22 insertions, 8 deletions
diff --git a/devel/ode-devel/Makefile b/devel/ode-devel/Makefile index 4f8951afa4f2..f9bb730a84d7 100644 --- a/devel/ode-devel/Makefile +++ b/devel/ode-devel/Makefile @@ -28,10 +28,6 @@ OPTIONS= OPCODE "Enable code required by TriList (trimesh) class" on .include <bsd.port.pre.mk> -.if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "sparc64" -BROKEN= "Does not compile." -.endif - post-patch: @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \ ${WRKSRC}/configurator.c diff --git a/devel/ode-devel/files/patch-configurator.c b/devel/ode-devel/files/patch-configurator.c new file mode 100644 index 000000000000..0fff17513eda --- /dev/null +++ b/devel/ode-devel/files/patch-configurator.c @@ -0,0 +1,11 @@ +--- configurator.c.orig Sat May 29 21:46:03 2004 ++++ configurator.c Tue Dec 6 03:48:15 2005 +@@ -222,7 +222,7 @@ + write_header_comment (file,"is this a pentium on a gcc-based platform?"); + write_to_file ("ctest.cpp", + "int main() {\n" +- " asm (\"mov $0,%%eax\\n cpuid\\n\" : : : \"%eax\");\n" ++ " asm (\"mov $0,%%eax\\n mov %%eax,(%%esi)\\n cpuid\\n\" : : : \"%eax\");\n" + " return 0;\n" + "}\n"); + delete_file ("ctest.exe"); diff --git a/devel/ode/Makefile b/devel/ode/Makefile index 2ad28f3cb2e6..5c3fae41962e 100644 --- a/devel/ode/Makefile +++ b/devel/ode/Makefile @@ -28,10 +28,6 @@ OPTIONS= OPCODE "Enable code required by TriList (trimesh) class" on .include <bsd.port.pre.mk> -.if ${ARCH} == "amd64" -BROKEN= "Does not build on amd64" -.endif - post-patch: @${REINPLACE_CMD} -e \ 's|malloc.h|stdlib.h|g' \ diff --git a/devel/ode/files/patch-configurator.c b/devel/ode/files/patch-configurator.c new file mode 100644 index 000000000000..0fff17513eda --- /dev/null +++ b/devel/ode/files/patch-configurator.c @@ -0,0 +1,11 @@ +--- configurator.c.orig Sat May 29 21:46:03 2004 ++++ configurator.c Tue Dec 6 03:48:15 2005 +@@ -222,7 +222,7 @@ + write_header_comment (file,"is this a pentium on a gcc-based platform?"); + write_to_file ("ctest.cpp", + "int main() {\n" +- " asm (\"mov $0,%%eax\\n cpuid\\n\" : : : \"%eax\");\n" ++ " asm (\"mov $0,%%eax\\n mov %%eax,(%%esi)\\n cpuid\\n\" : : : \"%eax\");\n" + " return 0;\n" + "}\n"); + delete_file ("ctest.exe"); |