summaryrefslogtreecommitdiff
path: root/devel/ode/patches/patch-ac
blob: 3c7e2600b904b45955436de68401360cf10c3b47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-ac,v 1.1 2008/10/02 17:53:37 joerg Exp $

Avoid Pentium specific assembly for binary packages. Also breaks AMD64.

--- configurator.c.orig	2008-10-02 19:50:59.000000000 +0200
+++ configurator.c
@@ -219,23 +219,7 @@ void run (char *filename)
 
 void check_if_this_is_a_pentium (FILE *file)
 {
-  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"
-		 "  return 0;\n"
-		 "}\n");
-  delete_file ("ctest.exe");
-  compile ("ctest.exe","ctest.cpp");
-  if (file_exists ("ctest.exe")) {
-    fprintf (file,"#define PENTIUM 1\n\n");
-  }
-  else {
     fprintf (file,"/* #define PENTIUM 1 -- not a pentium */\n\n");
-  }
-
-  delete_file ("ctest.cpp");
-  delete_file ("ctest.exe");
 }
 
 /****************************************************************************/