summaryrefslogtreecommitdiffstats
path: root/recipes-core/icedtea/openjdk-7-03b147/icedtea-hotspot-make-arch-sane-for-x86.patch
blob: be4a7d0b238ae8224e38b7bcb20e25f8f807aaa7 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
From bd7c262396b7e21311c0ef983743672eb245fed7 Mon Sep 17 00:00:00 2001
From: Henning Heinold <heinold@inf.fu-berlin.de>
Date: Wed, 14 Mar 2012 22:15:47 +0100
Subject: [PATCH] foo

---
 hotspot/agent/make/saenv.sh                  |    4 +-
 hotspot/make/defs.make                       |    4 +-
 hotspot/make/jprt.properties                 |   98 +++---
 hotspot/make/linux/build.sh                  |    2 +-
 hotspot/make/linux/makefiles/buildtree.make  |    4 +-
 hotspot/make/linux/makefiles/defs.make       |   24 +-
 hotspot/make/linux/makefiles/gcc.make        |    2 +-
 hotspot/make/linux/makefiles/i486.make       |   34 --
 hotspot/make/linux/makefiles/sparcWorks.make |    2 +-
 hotspot/make/linux/makefiles/x86.make        |   34 ++
 hotspot/make/linux/platform_i486             |   15 -
 hotspot/make/linux/platform_x86              |   15 +
 hotspot/src/os/linux/vm/os_linux.cpp         |    6 +-
 hotspot/src/os/posix/launcher/java_md.c      |   26 +-
 hotspot/src/share/tools/hsdis/Makefile       |    4 +-
 hotspot/src/share/tools/hsdis/hsdis.c        |  500 ++++++++++++++++++++++++++
 16 files changed, 637 insertions(+), 137 deletions(-)
 delete mode 100644 hotspot/make/linux/makefiles/i486.make
 create mode 100644 hotspot/make/linux/makefiles/x86.make
 delete mode 100644 hotspot/make/linux/platform_i486
 create mode 100644 hotspot/make/linux/platform_x86

diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
index 81c2d15..4cc3a28 100644
--- openjdk/hotspot/agent/make/saenv.sh
+++ openjdk/hotspot/agent/make/saenv.sh
@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
      OPTIONS="-Dsa.library.path=$SA_LIBPATH"
      CPU=amd64
    else
-     SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
+     SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
      OPTIONS="-Dsa.library.path=$SA_LIBPATH"
-     CPU=i386
+     CPU=x86
    fi
 else
    # configure audit helper library if SA_ALTROOT is set
diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
index fe6c4a2..7ae5b1e 100644
--- openjdk/hotspot/make/defs.make
+++ openjdk/hotspot/make/defs.make
@@ -216,7 +216,7 @@ ifneq ($(OSNAME),windows)
     ifdef LP64
       BUILDARCH = amd64
     else
-      BUILDARCH = i486
+      BUILDARCH = x86
     endif
   endif
   ifeq ($(BUILDARCH), sparc)
@@ -227,7 +227,7 @@ ifneq ($(OSNAME),windows)
 
   # LIBARCH is 1:1 mapping from BUILDARCH
   LIBARCH         = $(LIBARCH/$(BUILDARCH))
-  LIBARCH/i486    = i386
+  LIBARCH/x86     = x86
   LIBARCH/amd64   = amd64
   LIBARCH/sparc   = sparc
   LIBARCH/sparcv9 = sparcv9
diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
index 4c88ed0..e35cb84 100644
--- openjdk/hotspot/make/jprt.properties
+++ openjdk/hotspot/make/jprt.properties
@@ -106,19 +106,19 @@ jprt.my.solaris.x64.ejdk7=${jprt.my.solaris.x64.jdk7}
 jprt.my.solaris.x64.ejdk6=${jprt.my.solaris.x64.jdk6}
 jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
 
-jprt.my.linux.i586.jdk8=linux_i586_2.6
-jprt.my.linux.i586.jdk7=linux_i586_2.6
-jprt.my.linux.i586.jdk7b107=linux_i586_2.6
-jprt.my.linux.i586.jdk7temp=linux_i586_2.6
-jprt.my.linux.i586.jdk6=linux_i586_2.4
-jprt.my.linux.i586.jdk6perf=linux_i586_2.4
-jprt.my.linux.i586.jdk6u10=linux_i586_2.4
-jprt.my.linux.i586.jdk6u14=linux_i586_2.4
-jprt.my.linux.i586.jdk6u18=linux_i586_2.4
-jprt.my.linux.i586.jdk6u20=linux_i586_2.4
-jprt.my.linux.i586.ejdk7=linux_i586_2.6
-jprt.my.linux.i586.ejdk6=linux_i586_2.6
-jprt.my.linux.i586=${jprt.my.linux.i586.${jprt.tools.default.release}}
+jprt.my.linux.x86.jdk8=linux_x86_2.6
+jprt.my.linux.x86.jdk7=linux_x86_2.6
+jprt.my.linux.x86.jdk7b107=linux_x86_2.6
+jprt.my.linux.x86.jdk7temp=linux_x86_2.6
+jprt.my.linux.x86.jdk6=linux_x86_2.4
+jprt.my.linux.x86.jdk6perf=linux_x86_2.4
+jprt.my.linux.x86.jdk6u10=linux_x86_2.4
+jprt.my.linux.x86.jdk6u14=linux_x86_2.4
+jprt.my.linux.x86.jdk6u18=linux_x86_2.4
+jprt.my.linux.x86.jdk6u20=linux_x86_2.4
+jprt.my.linux.x86.ejdk7=linux_x86_2.6
+jprt.my.linux.x86.ejdk6=linux_x86_2.6
+jprt.my.linux.x86=${jprt.my.linux.x86.${jprt.tools.default.release}}
 
 jprt.my.linux.x64.jdk8=linux_x64_2.6
 jprt.my.linux.x64.jdk7=linux_x64_2.6
@@ -209,7 +209,7 @@ jprt.build.targets.standard= \
     ${jprt.my.solaris.sparcv9}-{product|fastdebug|debug}, \
     ${jprt.my.solaris.i586}-{product|fastdebug|debug}, \
     ${jprt.my.solaris.x64}-{product|fastdebug|debug}, \
-    ${jprt.my.linux.i586}-{product|fastdebug|debug}, \
+    ${jprt.my.linux.x86}-{product|fastdebug|debug}, \
     ${jprt.my.linux.x64}-{product|fastdebug}, \
     ${jprt.my.windows.i586}-{product|fastdebug|debug}, \
     ${jprt.my.windows.x64}-{product|fastdebug|debug}
@@ -220,7 +220,7 @@ jprt.build.targets.open= \
     ${jprt.my.linux.x64}-{productOpen}
 
 jprt.build.targets.embedded= \
-    ${jprt.my.linux.i586}-{productEmb|fastdebugEmb|debugEmb}, \
+    ${jprt.my.linux.x86}-{productEmb|fastdebugEmb|debugEmb}, \
     ${jprt.my.linux.ppc}-{productEmb|fastdebugEmb}, \
     ${jprt.my.linux.ppcv2}-{productEmb|fastdebugEmb}, \
     ${jprt.my.linux.ppcsflt}-{productEmb|fastdebugEmb}, \
@@ -364,33 +364,33 @@ jprt.my.solaris.i586.test.targets= \
     ${jprt.my.solaris.i586}-fastdebug-c2-jbb_G1, \
     ${jprt.my.solaris.i586}-fastdebug-c2-jbb_ParOldGC
 
-jprt.my.linux.i586.test.targets = \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-c2-jvm98_tiered, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
-    ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
-    ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
-    ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_G1, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParOldGC, \
-    ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
-    ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
-    ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
-    ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
-    ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
-    ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_G1, \
-    ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParOldGC, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-c2-jbb_default_tiered, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_G1, \
-    ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParOldGC
+jprt.my.linux.x86.test.targets = \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-c2-jvm98_tiered, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
+    ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
+    ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
+    ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_G1, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParOldGC, \
+    ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
+    ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
+    ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
+    ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
+    ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
+    ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_G1, \
+    ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParOldGC, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-c2-jbb_default_tiered, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_G1, \
+    ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParOldGC
 
 jprt.my.linux.x64.test.targets = \
     ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
@@ -478,26 +478,26 @@ jprt.test.targets.open = \
     ${jprt.my.linux.x64}-{productOpen|fastdebugOpen}-c2-jvm98_tiered
 
 # Testing for actual embedded builds is different to standard
-jprt.my.linux.i586.test.targets.embedded = \
-    linux_i586_2.6-product-c1-scimark
+jprt.my.linux.x86.test.targets.embedded = \
+    linux_x86_2.6-product-c1-scimark
 
 # The complete list of test targets for jprt
 # Note: no PPC or ARM tests at this stage
 
 jprt.test.targets.standard = \
-  ${jprt.my.linux.i586.test.targets.embedded}, \
+  ${jprt.my.linux.x86.test.targets.embedded}, \
   ${jprt.my.solaris.sparc.test.targets}, \
   ${jprt.my.solaris.sparcv9.test.targets}, \
   ${jprt.my.solaris.i586.test.targets}, \
   ${jprt.my.solaris.x64.test.targets}, \
-  ${jprt.my.linux.i586.test.targets}, \
+  ${jprt.my.linux.x86.test.targets}, \
   ${jprt.my.linux.x64.test.targets}, \
   ${jprt.my.windows.i586.test.targets}, \
   ${jprt.my.windows.x64.test.targets}, \
   ${jprt.test.targets.open}
 
 jprt.test.targets.embedded= 		\
-  ${jprt.my.linux.i586.test.targets.embedded}, \
+  ${jprt.my.linux.x86.test.targets.embedded}, \
   ${jprt.my.solaris.sparc.test.targets}, \
   ${jprt.my.solaris.sparcv9.test.targets}, \
   ${jprt.my.solaris.i586.test.targets}, \
@@ -528,7 +528,7 @@ jprt.test.targets=${jprt.test.targets.${jprt.tools.default.release}}
 jprt.make.rule.test.targets.standard.client = \
   ${jprt.my.solaris.sparc}-*-c1-clienttest, \
   ${jprt.my.solaris.i586}-*-c1-clienttest, \
-  ${jprt.my.linux.i586}-*-c1-clienttest, \
+  ${jprt.my.linux.x86}-*-c1-clienttest, \
   ${jprt.my.windows.i586}-*-c1-clienttest
 
 jprt.make.rule.test.targets.standard.server = \
@@ -536,7 +536,7 @@ jprt.make.rule.test.targets.standard.server = \
   ${jprt.my.solaris.sparcv9}-*-c2-servertest, \
   ${jprt.my.solaris.i586}-*-c2-servertest, \
   ${jprt.my.solaris.x64}-*-c2-servertest, \
-  ${jprt.my.linux.i586}-*-c2-servertest, \
+  ${jprt.my.linux.x86}-*-c2-servertest, \
   ${jprt.my.linux.x64}-*-c2-servertest, \
   ${jprt.my.windows.i586}-*-c2-servertest, \
   ${jprt.my.windows.x64}-*-c2-servertest
diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
index f46b8df..b06853f 100644
--- openjdk/hotspot/make/linux/build.sh
+++ openjdk/hotspot/make/linux/build.sh
@@ -43,7 +43,7 @@ esac
 
 case `uname -m` in
   i386|i486|i586|i686)
-    mach=i386
+    mach=x86
     ;;
   *)
     echo "Unsupported machine: " `uname -m`
diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
index f8a1e88..ce7b575 100644
--- openjdk/hotspot/make/linux/makefiles/buildtree.make
+++ openjdk/hotspot/make/linux/makefiles/buildtree.make
@@ -30,7 +30,7 @@
 # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
 # environment or on the command-line:
 #
-# ARCH		- sparc, i486, ... HotSpot cpu and os_cpu source directory
+# ARCH		- sparc, x86, ... HotSpot cpu and os_cpu source directory
 # BUILDARCH     - build directory
 # LIBARCH       - the corresponding directory in JDK/JRE
 # GAMMADIR	- top of workspace
@@ -371,7 +371,7 @@ NO_JAVA_HOME_MSG	= \
 DATA_MODE = $(DATA_MODE/$(BUILDARCH))
 JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
 
-DATA_MODE/i486    = 32
+DATA_MODE/x86     = 32
 DATA_MODE/sparc   = 32
 DATA_MODE/sparcv9 = 64
 DATA_MODE/amd64   = 64
diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
index c327974..757b333 100644
--- openjdk/hotspot/make/linux/makefiles/defs.make
+++ openjdk/hotspot/make/linux/makefiles/defs.make
@@ -72,6 +72,16 @@ ifeq ($(ARCH), sparc64)
   HS_ARCH            = sparc
 endif
 
+# x86
+ifeq ($(findstring 86,$(ARCH)), 86)
+  ifneq ($(ARCH), x86_64)
+    ARCH_DATA_MODEL  = 32
+    PLATFORM         = linux-x86
+    VM_PLATFORM      = linux_x86
+    HS_ARCH          = x86
+  endif
+endif
+
 # x86_64
 ifeq ($(ARCH), x86_64) 
   ifeq ($(ARCH_DATA_MODEL), 64)
@@ -82,22 +92,12 @@ ifeq ($(ARCH), x86_64)
     HS_ARCH         = x86
   else
     ARCH_DATA_MODEL = 32
-    PLATFORM        = linux-i586
-    VM_PLATFORM     = linux_i486
+    PLATFORM        = linux-x86
+    VM_PLATFORM     = linux_x86
     HS_ARCH         = x86
-    # We have to reset ARCH to i686 since SRCARCH relies on it
-    ARCH            = i686   
   endif
 endif
 
-# i686
-ifeq ($(ARCH), i686)
-  ARCH_DATA_MODEL  = 32
-  PLATFORM         = linux-i586
-  VM_PLATFORM      = linux_i486
-  HS_ARCH          = x86
-endif
-
 # ARM
 ifeq ($(ARCH), arm)
   ARCH_DATA_MODEL  = 32
diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
index 05505d4..1979420 100644
--- openjdk/hotspot/make/linux/makefiles/gcc.make
+++ openjdk/hotspot/make/linux/makefiles/gcc.make
@@ -105,7 +105,7 @@ CFLAGS += -fvisibility=hidden
 endif
 
 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
-ARCHFLAG/i486    = -m32 -march=i586
+ARCHFLAG/x86    = -m32
 ARCHFLAG/amd64   = -m64
 ARCHFLAG/ia64    =
 ARCHFLAG/sparc   = -m32 -mcpu=v9
diff --git openjdk/hotspot/make/linux/makefiles/i486.make openjdk/hotspot/make/linux/makefiles/i486.make
deleted file mode 100644
index 86e825d..0000000
--- openjdk/hotspot/make/linux/makefiles/i486.make
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#  
-#
-
-# TLS helper, assembled from .s file
-
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
-# Must also specify if CPU is little endian
-CFLAGS += -DVM_LITTLE_ENDIAN
-
-OPT_CFLAGS/compactingPermGenGen.o = -O1
diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
index 6e6c841..78e5041 100644
--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
@@ -33,7 +33,7 @@ HOSTCPP = $(CPP)
 HOSTCC  = $(CC)
 
 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
-ARCHFLAG/i486    = -m32
+ARCHFLAG/x86     = -m32
 ARCHFLAG/amd64   = -m64
 
 CFLAGS     += $(ARCHFLAG)
diff --git openjdk/hotspot/make/linux/makefiles/x86.make openjdk/hotspot/make/linux/makefiles/x86.make
new file mode 100644
index 0000000..86e825d
--- /dev/null
+++ openjdk/hotspot/make/linux/makefiles/x86.make
@@ -0,0 +1,34 @@
+#
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#  
+#
+
+# TLS helper, assembled from .s file
+
+# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
+OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
+# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
+OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
+# Must also specify if CPU is little endian
+CFLAGS += -DVM_LITTLE_ENDIAN
+
+OPT_CFLAGS/compactingPermGenGen.o = -O1
diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
deleted file mode 100644
index 610ac91..0000000
--- openjdk/hotspot/make/linux/platform_i486
+++ /dev/null
@@ -1,15 +0,0 @@
-os_family = linux
-
-arch = x86
-
-arch_model = x86_32
-
-os_arch = linux_x86
-
-os_arch_model = linux_x86_32
-
-lib_arch = i386
-
-compiler = gcc
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
new file mode 100644
index 0000000..5c613fe
--- /dev/null
+++ openjdk/hotspot/make/linux/platform_x86
@@ -0,0 +1,15 @@
+os_family = linux
+
+arch = x86
+
+arch_model = x86_32
+
+os_arch = linux_x86
+
+os_arch_model = linux_x86_32
+
+lib_arch = x86
+
+compiler = gcc
+
+sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
index dd75c42..dd91767 100644
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
@@ -261,10 +261,10 @@ bool os::have_special_privileges() {
 
 
 #ifndef SYS_gettid
-// i386: 224, ia64: 1105, amd64: 186, sparc 143
+// x86: 224, ia64: 1105, amd64: 186, sparc 143
 #ifdef __ia64__
 #define SYS_gettid 1105
-#elif __i386__
+#elif __x86__
 #define SYS_gettid 224
 #elif __amd64__
 #define SYS_gettid 186
@@ -281,7 +281,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
 #elif defined(IA64)
 static char cpu_arch[] = "ia64";
 #elif defined(IA32)
-static char cpu_arch[] = "i386";
+static char cpu_arch[] = "x86";
 #elif defined(AMD64)
 static char cpu_arch[] = "amd64";
 #elif defined(ARM)
diff --git openjdk/hotspot/src/os/posix/launcher/java_md.c openjdk/hotspot/src/os/posix/launcher/java_md.c
index 3ee0f20..29374ea 100644
--- openjdk/hotspot/src/os/posix/launcher/java_md.c
+++ openjdk/hotspot/src/os/posix/launcher/java_md.c
@@ -57,8 +57,8 @@
  * models is supported, then DUAL_MODE is defined.  When DUAL_MODE is
  * defined, the architecture names for the narrow and wide version of
  * the architecture are defined in LIBARCH64NAME and LIBARCH32NAME.  Currently
- * only Solaris on sparc/sparcv9 and i586/amd64 is DUAL_MODE; linux
- * i586/amd64 could be defined as DUAL_MODE but that is not the
+ * only Solaris on sparc/sparcv9 and x86/amd64 is DUAL_MODE; linux
+ * x86/amd64 could be defined as DUAL_MODE but that is not the
  * current policy.
  */
 
@@ -1175,7 +1175,7 @@ get_cpuid(uint32_t arg,
 
 #endif /* __sun && i586 */
 
-#if defined(__linux__) && defined(i586)
+#if defined(__linux__) && defined(x86)
 
 /*
  * A utility method for asking the CPU about itself.
@@ -1240,11 +1240,11 @@ get_cpuid(uint32_t arg,
 #endif
 }
 
-#endif /* __linux__ && i586 */
+#endif /* __linux__ && x86 */
 
-#ifdef i586
+#if defined(i586) || defined(x86)
 /*
- * Routines shared by solaris-i586 and linux-i586.
+ * Routines shared by solaris-i586 and linux-x86.
  */
 
 enum HyperThreadingSupport_enum {
@@ -1384,7 +1384,7 @@ physical_processors(void) {
   return result;
 }
 
-#endif /* i586 */
+#endif /* i586 || x86 */
 
 #if defined(__sun) && defined(i586)
 
@@ -1419,11 +1419,11 @@ solaris_i586_ServerClassMachine(void) {
 
 #endif /* __sun && i586 */
 
-#if defined(__linux__) && defined(i586)
+#if defined(__linux__) && defined(x86)
 
-/* The definition of a server-class machine for linux-i586 */
+/* The definition of a server-class machine for linux-x86 */
 jboolean
-linux_i586_ServerClassMachine(void) {
+linux_x86_ServerClassMachine(void) {
   jboolean            result            = JNI_FALSE;
   /* How big is a server class machine? */
   const unsigned long server_processors = 2UL;
@@ -1450,7 +1450,7 @@ linux_i586_ServerClassMachine(void) {
   return result;
 }
 
-#endif /* __linux__ && i586 */
+#endif /* __linux__ && x86 */
 
 /* Dispatch to the platform-specific definition of "server-class" */
 jboolean
@@ -1464,8 +1464,8 @@ ServerClassMachine(void) {
   result = solaris_sparc_ServerClassMachine();
 #elif defined(__sun) && defined(i586)
   result = solaris_i586_ServerClassMachine();
-#elif defined(__linux__) && defined(i586)
-  result = linux_i586_ServerClassMachine();
+#elif defined(__linux__) && defined(x86)
+  result = linux_x86_ServerClassMachine();
 #else
   if (_launcher_debug) {
     printf("ServerClassMachine: returns default value of %s\n",
diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
index 19f9cdb..b2b9092 100644
--- openjdk/hotspot/src/share/tools/hsdis/Makefile
+++ openjdk/hotspot/src/share/tools/hsdis/Makefile
@@ -25,7 +25,7 @@
 # Single gnu makefile for solaris, linux and windows (windows requires cygwin and mingw)
 
 # Default arch; it is changed below as needed.
-ARCH		= i386
+ARCH		= x86
 OS		= $(shell uname)
 
 ## OS = SunOS ##
@@ -40,7 +40,7 @@ ifdef LP64
 ifeq ($(ARCH),sparc)
 ARCH            = sparcv9
 endif
-ifeq ($(ARCH),i386)
+ifeq ($(ARCH),x86)
 ARCH            = amd64
 endif
 endif
diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
index daea404..2e49766 100644
--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
@@ -384,8 +384,8 @@ static void print_help(struct hsdis_app_data* app_data,
   else
     disassembler_usage(stderr); /* better than nothing */
   (*printf_callback)(printf_stream, "  mach=<arch>   select disassembly mode\n");
-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
-  (*printf_callback)(printf_stream, "  mach=i386     select 32-bit mode\n");
+#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
+  (*printf_callback)(printf_stream, "  mach=x86      select 32-bit mode\n");
   (*printf_callback)(printf_stream, "  mach=x86-64   select 64-bit mode\n");
   (*printf_callback)(printf_stream, "  suffix        always print instruction suffix\n");
 #endif
@@ -406,11 +406,11 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
 
 static const char* native_arch_name() {
   const char* res = NULL;
-#ifdef LIBARCH_i386
-    res = "i386";
+#ifdef LIBARCH_x86
+    res = "x86";
 #endif
 #ifdef LIBARCH_amd64
-    res = "i386:x86-64";
+    res = "x86-64";
 #endif
 #ifdef LIBARCH_sparc
     res = "sparc:v8plusb";