Compare commits

..

887 Commits

Author SHA1 Message Date
J. Duke
59b1cb08b1 Merge 2017-07-05 18:28:04 +02:00
J. Duke
eee3ee6667 Merge 2017-07-05 18:28:00 +02:00
J. Duke
f616c07625 Merge 2017-07-05 18:27:52 +02:00
J. Duke
793d2a5cc7 Merge 2017-07-05 18:27:48 +02:00
J. Duke
bff3424f31 Merge 2017-07-05 18:27:41 +02:00
J. Duke
ba5a934ca5 Merge 2017-07-05 18:27:34 +02:00
J. Duke
3093593cd6 Merge 2017-07-05 18:27:17 +02:00
J. Duke
2ccd6e0dcd Added tag jdk8-b62 for changeset 8d9d430b4244 2017-07-05 18:26:51 +02:00
J. Duke
650aac0d5e Merge 2017-07-05 18:26:51 +02:00
J. Duke
660252e4ca Merge 2017-07-05 18:26:46 +02:00
J. Duke
a7f5555be7 Merge 2017-07-05 18:26:42 +02:00
J. Duke
ef7e44d123 Merge 2017-07-05 18:26:38 +02:00
J. Duke
70623bf3ab Merge 2017-07-05 18:26:35 +02:00
J. Duke
7f6f9bba4e Merge 2017-07-05 18:26:30 +02:00
J. Duke
d9350fdee2 Merge 2017-07-05 18:26:26 +02:00
J. Duke
919df15706 Added tag jdk8-b61 for changeset cdaa6122185f 2017-07-05 18:26:11 +02:00
J. Duke
1c78bebc35 Merge 2017-07-05 18:26:11 +02:00
J. Duke
cddf07210d Merge 2017-07-05 18:26:07 +02:00
J. Duke
9f17fd50fc Merge 2017-07-05 18:25:59 +02:00
J. Duke
3fa8795fb3 Merge 2017-07-05 18:25:55 +02:00
J. Duke
3cd8332ef3 Merge 2017-07-05 18:25:50 +02:00
J. Duke
b4c5895713 Merge 2017-07-05 18:25:45 +02:00
J. Duke
71c74c0b70 Merge 2017-07-05 18:25:32 +02:00
J. Duke
87333a2f62 Added tag jdk8-b60 for changeset 5e3adc681779 2017-07-05 18:25:14 +02:00
J. Duke
34063e3656 Merge 2017-07-05 18:25:14 +02:00
J. Duke
0042095350 Merge 2017-07-05 18:25:10 +02:00
J. Duke
90f4e99281 Merge 2017-07-05 18:25:06 +02:00
J. Duke
5b7fbbf597 Merge 2017-07-05 18:25:03 +02:00
J. Duke
d83447ce3b Merge 2017-07-05 18:24:59 +02:00
J. Duke
41ffa08140 Merge 2017-07-05 18:24:56 +02:00
J. Duke
3110f8bbe6 Merge 2017-07-05 18:24:52 +02:00
J. Duke
205dc9cf8b Added tag jdk8-b59 for changeset 3bd874584fc0 2017-07-05 18:24:38 +02:00
J. Duke
4e637a8f80 Merge 2017-07-05 18:24:37 +02:00
J. Duke
376e043f9d Merge 2017-07-05 18:24:33 +02:00
J. Duke
c23b39b47b Merge 2017-07-05 18:24:29 +02:00
J. Duke
9817a2f423 Merge 2017-07-05 18:24:25 +02:00
J. Duke
c2f20c5030 Merge 2017-07-05 18:24:21 +02:00
J. Duke
23494ba5e1 Merge 2017-07-05 18:24:16 +02:00
J. Duke
a8a3c94590 Merge 2017-07-05 18:24:12 +02:00
J. Duke
a7b9262623 Added tag jdk8-b58 for changeset 479d3302a26d 2017-07-05 18:23:51 +02:00
J. Duke
5238f9a66e Merge 2017-07-05 18:23:50 +02:00
J. Duke
55b82e40b3 Merge 2017-07-05 18:23:47 +02:00
J. Duke
24677fd4bb Merge 2017-07-05 18:23:39 +02:00
J. Duke
5107b3609e Merge 2017-07-05 18:23:35 +02:00
J. Duke
20730872fc Merge 2017-07-05 18:23:31 +02:00
J. Duke
e6408227d1 Merge 2017-07-05 18:23:26 +02:00
J. Duke
bfd962e674 Merge 2017-07-05 18:23:11 +02:00
J. Duke
2fef43b669 Added tag jdk8-b57 for changeset 2c21c080b11b 2017-07-05 18:22:53 +02:00
J. Duke
901ebe2983 Merge 2017-07-05 18:22:52 +02:00
J. Duke
47bb8608ad Merge 2017-07-05 18:22:48 +02:00
J. Duke
48ad58fa77 Merge 2017-07-05 18:22:45 +02:00
J. Duke
80fc527638 Merge 2017-07-05 18:22:41 +02:00
J. Duke
20906872f6 Merge 2017-07-05 18:22:37 +02:00
J. Duke
4246df5345 Merge 2017-07-05 18:22:34 +02:00
J. Duke
8a55a875e1 Merge 2017-07-05 18:22:29 +02:00
J. Duke
371977df55 Added tag jdk8-b56 for changeset ffe6bce5a521 2017-07-05 18:22:17 +02:00
J. Duke
6c1ac6f6bb Merge 2017-07-05 18:22:17 +02:00
J. Duke
5d3d8d0b84 Merge 2017-07-05 18:22:13 +02:00
J. Duke
9b01d7e0bb Merge 2017-07-05 18:22:07 +02:00
J. Duke
44ae1fd86b Merge 2017-07-05 18:22:04 +02:00
J. Duke
b614bef576 Merge 2017-07-05 18:22:00 +02:00
J. Duke
24c9ac5300 Merge 2017-07-05 18:21:57 +02:00
J. Duke
a337e0b71b Merge 2017-07-05 18:21:43 +02:00
J. Duke
cca26ba2b7 Added tag jdk8-b55 for changeset 319f583f66db 2017-07-05 18:21:34 +02:00
J. Duke
b41431ec80 Merge 2017-07-05 18:21:34 +02:00
J. Duke
68a1e451a2 Merge 2017-07-05 18:21:31 +02:00
J. Duke
f47e7715b4 Merge 2017-07-05 18:21:25 +02:00
J. Duke
1a48692ef0 Merge 2017-07-05 18:21:21 +02:00
J. Duke
d549f23f6e Merge 2017-07-05 18:21:16 +02:00
J. Duke
1ec942e76b Merge 2017-07-05 18:21:11 +02:00
J. Duke
1f440ad0dd Merge 2017-07-05 18:20:49 +02:00
J. Duke
298c94f697 Added tag jdk8-b54 for changeset 7c6aa31ff1b2 2017-07-05 18:20:34 +02:00
J. Duke
264a0511f0 Merge 2017-07-05 18:20:34 +02:00
J. Duke
f82ac54169 Merge 2017-07-05 18:20:30 +02:00
J. Duke
fc33bef8bb Merge 2017-07-05 18:20:27 +02:00
J. Duke
3b33fd061c Merge 2017-07-05 18:20:24 +02:00
J. Duke
e6ffa52d43 Merge 2017-07-05 18:20:20 +02:00
J. Duke
8363b5b7c9 Merge 2017-07-05 18:20:17 +02:00
J. Duke
cf93fdf2b3 Merge 2017-07-05 18:20:14 +02:00
J. Duke
1a12fb6afd Added tag jdk8-b53 for changeset c7aa5cca1c01 2017-07-05 18:20:01 +02:00
J. Duke
b07a721f8e Merge 2017-07-05 18:20:00 +02:00
J. Duke
6e3ed1044e Merge 2017-07-05 18:19:56 +02:00
J. Duke
069e1296d1 Merge 2017-07-05 18:19:53 +02:00
J. Duke
bff2359a25 Merge 2017-07-05 18:19:51 +02:00
J. Duke
d9de7d838b Merge 2017-07-05 18:19:48 +02:00
J. Duke
10134c92f8 Merge 2017-07-05 18:19:45 +02:00
J. Duke
69c2591eb4 Merge 2017-07-05 18:19:42 +02:00
J. Duke
f7b87d9833 Added tag jdk8-b52 for changeset b67041a6cb50 2017-07-05 18:19:34 +02:00
J. Duke
9e31be3e8d Merge 2017-07-05 18:19:33 +02:00
J. Duke
8bb866cd99 Merge 2017-07-05 18:19:30 +02:00
J. Duke
b7b5241c60 Merge 2017-07-05 18:19:25 +02:00
J. Duke
ed8595a7e8 Merge 2017-07-05 18:19:22 +02:00
J. Duke
372f7206d6 Merge 2017-07-05 18:19:19 +02:00
J. Duke
0c5ff79b67 Merge 2017-07-05 18:19:16 +02:00
J. Duke
f470b922c6 Merge 2017-07-05 18:19:08 +02:00
J. Duke
4b70292c6e Added tag jdk8-b51 for changeset 382651d28f25 2017-07-05 18:18:57 +02:00
David Katleman
3d8056dd67 Merge 2012-10-31 18:36:25 -07:00
David Katleman
2e31573747 Merge 2012-10-31 18:35:56 -07:00
David Katleman
46373aeb65 Merge 2012-10-31 18:30:52 -07:00
David Katleman
259b13360c Merge 2012-10-31 18:30:51 -07:00
David Katleman
f4def79f36 Merge 2012-10-31 18:30:08 -07:00
David Katleman
40914d37e4 Merge 2012-10-31 18:30:07 -07:00
Lana Steuck
da89e5624c Merge 2012-10-30 13:56:59 -07:00
Magnus Ihse Bursie
1e78e4b639 8001897: build-infra: misc adjustments to configure script
Reviewed-by: ohair
2012-10-29 14:06:57 -07:00
Erik Joelsson
e64619c43f 8001898: build-infra: correct exclusion lists for mac jar builds
8001896: build-infra: UNLIMITED_CRYPTO changes

Reviewed-by: ohair
2012-10-29 13:55:47 -07:00
Fredrik Öhrström
f4511e60c5 8001891: build-infra: Adding X_CFLAGS and X_LIBS to lwawt and sizer compilation
Reviewed-by: ohair
2012-10-29 13:41:38 -07:00
Erik Joelsson
c28e34e514 8001887: build-infra: Correct mapfiles in build-infra area
Reviewed-by: ohair
2012-10-29 13:04:40 -07:00
Kelly O'Hair
f9c6f4bd18 8000992: Update new build-infra makefiles
Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work.

Reviewed-by: erikj, ihse, dholmes, tbell
2012-10-26 14:29:57 -07:00
Kelly O'Hair
ab0a4530c8 8000992: Update new build-infra makefiles
Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work.

Reviewed-by: erikj, ihse, dholmes, tbell
2012-10-26 14:25:52 -07:00
Kelly O'Hair
4e44b9cf81 8000992: Update new build-infra makefiles
Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work.

Reviewed-by: erikj, ihse, dholmes, tbell
2012-10-26 14:25:29 -07:00
Kelly O'Hair
4a59eea32b 8000992: Update new build-infra makefiles
Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work.

Reviewed-by: erikj, ihse, dholmes, tbell
2012-10-26 14:25:17 -07:00
Kelly O'Hair
c15035bb7f 8000992: Update new build-infra makefiles
Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work.

Reviewed-by: erikj, ihse, dholmes, tbell
2012-10-26 14:24:21 -07:00
Kelly O'Hair
38c629a354 8000992: Update new build-infra makefiles
Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work.

Reviewed-by: erikj, ihse, dholmes, tbell
2012-10-26 14:23:29 -07:00
Alejandro Murillo
97c1b9deae Added tag hs25-b07 for changeset 490cfcf46c7d 2012-10-26 14:09:53 -07:00
Alejandro Murillo
2f0d944b8a Merge 2012-10-26 14:09:52 -07:00
Vladimir Kozlov
b8abfa016c Merge 2012-10-26 12:06:55 -07:00
Vladimir Kozlov
fc84b11227 8001635: assert(in_bb(n)) failed: must be
Added missed check that Load node is in processed loop block.

Reviewed-by: twisti
2012-10-26 11:48:04 -07:00
John Coomes
ebba61f003 Merge 2012-10-26 08:38:22 -07:00
Lana Steuck
8f0b240e99 Merge 2012-10-25 20:33:49 -07:00
Lana Steuck
b8265239b8 Merge 2012-10-25 20:32:10 -07:00
Lana Steuck
5d67b08f40 Merge 2012-10-25 20:07:46 -07:00
Lana Steuck
69720b975c Merge 2012-10-25 20:07:39 -07:00
Lana Steuck
f3ef67a598 Merge 2012-10-25 20:05:36 -07:00
Lana Steuck
91fac51819 Merge 2012-10-25 20:04:23 -07:00
Vladimir Kozlov
4531e51fc4 7163534: VM could crashes assert(false) failed: infinite EA connection graph build
In case of time or iterations limit reached C2 stops EA and continue compilation without EA as it does in product VM already.

Reviewed-by: twisti
2012-10-25 17:32:03 -07:00
Jon Masamitsu
0c42ca44f3 8001584: NPG: Incorrect assertion in BinaryTreeDictionary::get_chunk()
Reviewed-by: johnc, tamao
2012-10-25 12:59:37 -07:00
David Katleman
431bad33c0 Added tag jdk8-b62 for changeset 90de1dc5cd5b 2012-10-25 09:54:41 -07:00
David Katleman
bb35ccdbc3 Added tag jdk8-b62 for changeset f0d59eea9c70 2012-10-25 09:54:03 -07:00
David Katleman
3e547a0921 Added tag jdk8-b62 for changeset ea25fe53bbce 2012-10-25 09:53:40 -07:00
David Katleman
8ca6d2e3fb Added tag jdk8-b62 for changeset 6fc9f2af5e0d 2012-10-25 09:53:35 -07:00
David Katleman
86f198088a Added tag jdk8-b62 for changeset e3e135066607 2012-10-25 09:53:16 -07:00
David Katleman
43443b03d5 Added tag jdk8-b62 for changeset fbfe6a11980d 2012-10-25 09:53:01 -07:00
David Katleman
0b024171d1 Added tag jdk8-b62 for changeset b2bf9e584614 2012-10-25 09:52:58 -07:00
Tom Deneau
6d94ef1ee7 7184394: add intrinsics to use AES instructions
Use new x86 AES instructions for AESCrypt.

Reviewed-by: twisti, kvn, roland
2012-10-24 14:33:22 -07:00
David Katleman
564fea623a Merge 2012-10-24 13:14:18 -07:00
David Katleman
a714bf1b0b Merge 2012-10-24 13:11:45 -07:00
David Katleman
655033b76c Merge 2012-10-24 13:11:42 -07:00
Vladimir Kozlov
a9c2b6a900 8001183: incorrect results of char vectors right shift operaiton
Do vector right shift operation for small int types only after loads

Reviewed-by: jrose, dlong
2012-10-23 13:06:37 -07:00
Lana Steuck
736ab82961 Merge 2012-10-23 11:29:53 -07:00
Volker Simonis
5b56f65379 7152336: Enable builds on Windows with MinGW/MSYS
Minimal makefile changes to enable building OpenJDK using MSYS on Windows7

Reviewed-by: ohair, tbell
2012-10-23 10:10:49 -07:00
Volker Simonis
9c0b5ee904 7152336: Enable builds on Windows with MinGW/MSYS
Minimal makefile changes to enable building OpenJDK using MSYS on Windows7

Reviewed-by: ohair, tbell
2012-10-23 10:10:39 -07:00
Volker Simonis
906081c12d 7152336: Enable builds on Windows with MinGW/MSYS
Minimal makefile changes to enable building OpenJDK using MSYS on Windows7

Reviewed-by: ohair, tbell
2012-10-23 10:10:23 -07:00
Lana Steuck
74ef0287be Merge 2012-10-23 09:42:48 -07:00
Lana Steuck
4048bc01c6 Merge 2012-10-23 09:41:52 -07:00
Lana Steuck
cb7543fafd Merge 2012-10-23 09:41:02 -07:00
Lana Steuck
63e3083133 Merge 2012-10-23 09:40:43 -07:00
Lana Steuck
dfb0a3761f Merge 2012-10-23 09:40:39 -07:00
Lana Steuck
6ae7845341 Merge 2012-10-23 09:40:06 -07:00
Lana Steuck
e857d47bb5 Merge 2012-10-23 09:38:38 -07:00
John Zavgren
28475942c9 8000204: Memory leak in com/sun/security/auth/module/Unix.c
Reviewed-by: dsamersoff, wetmore, khazra, chegar
2012-10-23 11:57:47 +01:00
Alexander Scherbatiy
3c6c782cf3 6624200: Regression test fails: test/closed/javax/swing/JMenuItem/4654927/bug4654927.java
Reviewed-by: rupashka
2012-10-23 14:30:41 +04:00
Andrew Brygin
433715e09c 7051394: NullPointerException when running regression tests LoadProfileTest by using openjdk-7-b144
Reviewed-by: jgodinez, prr
2012-10-23 13:10:52 +04:00
Weijun Wang
8744fd02bd 8001208: Fix for KRB5CCNAME not complete
Reviewed-by: xuelei
2012-10-23 10:02:23 +08:00
Keith McGuigan
9322a179db 8001225: Disable jdk regression test java/lang/System/Versions.java until jdk's classfile version code is updated
Exclude java/lang/System/Versions.java test

Reviewed-by: sspitsyn, coleenp
2012-10-22 20:12:19 -04:00
Christian Thalinger
65c20a5492 8000821: JSR 292: C1 fails to call virtual method (JRUBY-6920)
Reviewed-by: kvn
2012-10-22 16:56:03 -07:00
Christian Thalinger
c915e9da09 6771058: TEST_BUG: java/lang/ref/Basic.java may fail with -server -Xcomp
Reviewed-by: dholmes, mchung
2012-10-22 14:22:30 -07:00
Vladimir Ivanov
7f87237400 8000805: JMM issue: short loads are non-atomic
Perform transforms during IGVN phase when Load has a single user.

Reviewed-by: jrose, kvn, twisti
2012-10-22 11:44:30 -07:00
Coleen Phillimore
fa470cb77e Merge 2012-10-22 12:01:35 -04:00
Weijun Wang
5e1584a438 8000624: Move MaxRetries.java to ProblemList for the moment
Reviewed-by: alanb
2012-10-22 17:01:35 +08:00
Weijun Wang
3dcf67df0d 8001204: typo: Unable to obtain Princpal Name for authentication
Reviewed-by: xuelei
2012-10-22 09:59:23 +08:00
Jim Holmlund
d11cb7e6c1 7197401: Add a subset of the org.objectweb.asm packages to jdk8
Reviewed-by: ohair, briangoetz, erikj, iris
2012-10-20 22:49:26 +01:00
Alan Bateman
0905490fac 8000941: Remove ftp from the required list of protocol handlers
Reviewed-by: chegar
2012-10-20 21:07:50 +01:00
Xue-Lei Andrew Fan
29edcef765 8000954: Add final keyword to new method in SSLParameters
Reviewed-by: wetmore
2012-10-19 20:36:36 -07:00
Zhengyu Gu
dff9c7f852 Merge 2012-10-19 18:55:08 -07:00
Zhengyu Gu
3e481cdd81 7199092: NMT: NMT needs to deal overlapped virtual memory ranges
Enhanced virtual memory tracking to track committed regions as well as reserved regions, so NMT now can generate virtual memory map.

Reviewed-by: acorn, coleenp
2012-10-19 21:40:07 -04:00
Christian Thalinger
01d0ba69ce 8000989: smaller code changes to make future JSR 292 backports easier
Reviewed-by: jrose
2012-10-19 17:04:35 -07:00
Alejandro Murillo
8277d1355e 8001176: new hotspot build - hs25-b07
Reviewed-by: jcoomes
2012-10-19 11:26:17 -07:00
Dean Long
e57ac83cac 8001101: C2: more general vector rule subsetting
Allow which vector rules are supported to be decided at runtime. Also a small change to allow vector types in Type::_type_info[] to apply to more platforms.

Reviewed-by: kvn, twisti
2012-10-19 14:21:09 -04:00
Alejandro Murillo
65c322fa70 Added tag hs25-b06 for changeset 57dfd29e4742 2012-10-19 11:03:04 -07:00
Alejandro Murillo
639aa5d99f Merge 2012-10-19 11:03:04 -07:00
Yumin Qi
f214e4cef3 8001055: Bytes.swap should follow big endian
This is a mistake change in 6879063 about Bytes.swap. Java byte code order always follows big endian, but in that change, assume they follow native platform order that is not right.

Reviewed-by: coleenp, sspitsyn, dholmes
2012-10-19 08:58:14 -07:00
Yumin Qi
3d8142d5fd 8000818: SA constant pool need to reference to reference map after permgen removal
After permgen removal, constant pool changed to put _ldc and _ldc_w (fast_ldc and fast_ldcw) index to reference map, no longer calculated via constant pool cache.

Reviewed-by: coleenp, sspitsyn, dholmes
2012-10-19 08:56:57 -07:00
Sergey Bylokhov
b61d0d9772 7124520: [macosx] re:6373505 Toolkit.getScreenResolution() != GraphicsConfiguration.getNormalizingTransform()
Reviewed-by: anthony, kizune
2012-10-19 15:23:14 +04:00
John Zavgren
3c2e0ae2ac 8000206: Uninitialized variable in PlainDatagramSocketImpl.c
Reviewed-by: dsamersoff, khazra, chegar
2012-10-19 11:43:59 +01:00
Abhijit Saha
d66bdb868d Merge 2012-10-18 22:01:26 -07:00
Abhijit Saha
19fc2d4d88 Merge 2012-10-18 21:58:55 -07:00
David Katleman
8bb18682d4 Added tag jdk8-b61 for changeset 539f9d08a9e5 2012-10-18 11:09:45 -07:00
David Katleman
d9aab5025e Added tag jdk8-b61 for changeset 1a8b3b760f60 2012-10-18 11:09:00 -07:00
David Katleman
4dae92ce29 Added tag jdk8-b61 for changeset 3d833bc526da 2012-10-18 11:08:36 -07:00
David Katleman
0f95eb5efc Added tag jdk8-b61 for changeset 877dd5308e32 2012-10-18 11:08:30 -07:00
David Katleman
3e188b4775 Added tag jdk8-b61 for changeset 929432f0c3b6 2012-10-18 11:08:05 -07:00
David Katleman
c7df814ec7 Added tag jdk8-b61 for changeset e4251351a6dd 2012-10-18 11:07:46 -07:00
David Katleman
f88b8fb20f Added tag jdk8-b61 for changeset 0623a2cf29df 2012-10-18 11:07:40 -07:00
Harold Seigel
240b5c9329 7053130: hs_err file does not record specified CLASSPATH
Added code to write the value of the java.class.path property to the hs_err file.

Reviewed-by: kmo, dholmes, kvn
2012-10-18 13:09:47 -04:00
Harold Seigel
e9755cef6a 7188233: UseVMInterruptibleIO flag deprecate for JDK8
The -XX:+UseVMInterruptibleIO flag is deprecated for JDK8.  The flag will still enable Interruptible IO on Solaris, but users will get a warning.

Reviewed-by: dholmes, acorn, alanb
2012-10-18 13:08:13 -04:00
Coleen Phillimore
b1c7936406 Merge 2012-10-18 12:29:56 -04:00
Alexander Scherbatiy
9a39ec25ca 7175707: [macosx] PIT: 8 b43 Not running on AppKit thread issue again
Reviewed-by: serb, anthony
2012-10-18 18:28:42 +04:00
Vladimir Kozlov
247b39e010 8001071: Add simple range check into VM implemenation of Unsafe access methods
Add simple check in debug version of VM.

Reviewed-by: twisti, johnc
2012-10-18 07:06:31 -07:00
Alexander Scherbatiy
80d1115eb7 7199708: FileChooser crashs when opening large folder
Reviewed-by: bagiras
2012-10-18 17:50:43 +04:00
Xue-Lei Andrew Fan
1892ebf911 7068321: Support TLS Server Name Indication (SNI) Extension in JSSE Server
Reviewed-by: mullan, weijun, wetmore
2012-10-18 01:14:00 -07:00
Jon Masamitsu
ea25b80875 Merge 2012-10-17 13:59:57 -07:00
Naoto Sato
1fb9910146 8001046: java/util/PluggableLocale/LocaleNameProviderTest.sh failing
Reviewed-by: okutsu
2012-10-17 13:22:39 -07:00
Alan Bateman
81d4408852 8000362: (pack200) Deprecate Packer/Unpacker addPropertyChangeLister and removePropertyChangeListener methods
Reviewed-by: lancea, chegar, mchung, ksrini
2012-10-17 21:05:36 +01:00
Paul Sandoz
9498132479 7198496: (sl) ServiceLoader.load(Class, null) behavior differs from spec
Reviewed-by: dholmes, alanb
2012-10-17 20:34:04 +01:00
Vladimir Kozlov
2d3b78abcc 8000623: tools/javac/Diagnostics/6769027/T6769027.java crashes in PSPromotionManager::copy_to_survivor_space
Fix type of method pointer load from vtable.

Reviewed-by: twisti, johnc, roland
2012-10-17 12:09:32 -07:00
Mandy Chung
15df2d2de5 8001012: jdk8 SKIP_BUILD_CYCLE=false build fails with BUILD_JAXWS=false
Reviewed-by: alanb, ohair
2012-10-17 12:03:20 -07:00
Maurizio Cimadamore
848ec301f2 7192245: Add parser support for default methods
Add support for 'default' keyword in modifier position

Reviewed-by: jjg
2012-10-17 16:43:26 +01:00
Nils Loodin
953bec36ab 8000617: It should be possible to allocate memory without the VM dying
Reviewed-by: coleenp, kamg
2012-10-17 17:36:48 +02:00
Jaroslav Bachorik
9c38da478a 6809322: javax.management.timer.Timer does not fire all notifications
Some notifications get dropped due to ConcurrentModificationException thrown in Timer.notifyAlarmClock() method.

Reviewed-by: dholmes, rbackman
2012-10-17 18:34:07 +04:00
Alexander Scherbatiy
45dd15087f 8000626: Implement dead key detection for KeyEvent on Linux
Reviewed-by: kizune
2012-10-17 10:16:26 -04:00
Alexander Scherbatiy
721264460a 8000969: [macosx] Directories are not deselected when JFileChooser has FILES_ONLY selection mode
Reviewed-by: rupashka
2012-10-17 17:33:26 +04:00
Neil Richards
a76d98e716 8000955: Hashtable.Entry.hashCode() does not conform to Map.Entry.hashCode() defined behaviour
Reviewed-by: mduigou, alanb
2012-10-17 13:35:22 +01:00
Alan Bateman
ed656de70f 8000685: (props) Properties.storeToXML/loadFromXML should only require UTF-8 and UTF-16 to be supported
Reviewed-by: mchung, chegar
2012-10-17 11:43:56 +01:00
Alexander Zuev
336948d514 7175704: [macosx] "8" PIT: NPE in GetDisplayMode fullscreen test
Reviewed-by: serb, leonidr
2012-10-17 14:32:15 +04:00
Jonathan Gibbons
4aedf7469a 8000673: remove dead code from HtmlWriter and subtypes
Reviewed-by: bpatel
2012-10-16 21:03:36 -07:00
Kurchi Subhra Hazra
56e63d98b9 7198073: (prefs) user prefs not saved [macosx]
Using class member field to get node instead of argument

Reviewed-by: alanb
2012-10-16 15:23:17 -07:00
Naoto Sato
2647f75cdd 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
8000273: java.util.Locale.getDisplayVariant(Locale l) isn't transferred to the custom service provider
8000615: JRE adapter: timezone name of en_US is changed when extension directory is added

Reviewed-by: okutsu
2012-10-16 10:59:21 -07:00
Mikhail Cherkasov
1fd51fa05e 6818083: When DISPLAY is bad, InternalError thrown, not AWTError
Throw AWTError instead of InternalError if the DISPLAY is bad

Reviewed-by: anthony, serb
2012-10-16 20:11:19 +04:00
Jonathan Gibbons
a0b8f099ab 8000666: javadoc should write directly to Writer instead of composing strings
Reviewed-by: bpatel
2012-10-15 17:07:55 -07:00
Rob McKenna
a14592d891 8000487: Java JNDI connection library on ldap conn is not honoring configured timeout
Reviewed-by: vinnie
2012-10-15 22:34:35 +01:00
John Cuthbertson
9abdcd4a3c 8000831: Heap verification output incorrect/incomplete
Restore non-silent output of heap verification.

Reviewed-by: ysr, brutisso, jmasa
2012-10-15 10:02:42 -07:00
Rob McKenna
2dca3dc06b 8000817: Reinstate accidentally removed sleep() from ProcessBuilder/Basic.java
Reviewed-by: alanb, martin
2012-10-15 03:26:11 +01:00
Stephen Flores
037bcf1683 7194449: String resources for Key Tool and Policy Tool should be in their respective packages
Reviewed-by: alanb, weijun, mullan
2012-10-14 22:58:59 +01:00
Jim Gish
48ba63e9e0 7146552: java/util/logging/LoggingMXBeanTest.java failing intermittently
Reviewed-by: alanb, mchung
2012-10-13 10:15:57 +01:00
Lana Steuck
ff931a19c1 Merge 2012-10-12 14:53:50 -07:00
Lana Steuck
3567fc5460 Merge 2012-10-12 14:52:24 -07:00
Lana Steuck
c691ebd027 Merge 2012-10-12 14:50:07 -07:00
Lana Steuck
22b345adc6 Merge 2012-10-12 14:47:26 -07:00
Lana Steuck
0a7c808a56 Merge 2012-10-12 14:46:53 -07:00
Lana Steuck
ec8b85166e Merge 2012-10-12 14:46:47 -07:00
Alejandro Murillo
515f1281e1 8000834: new hotspot build - hs25-b06
Reviewed-by: jcoomes
2012-10-12 14:06:27 -07:00
Alejandro Murillo
d586b5d037 Added tag hs25-b05 for changeset 29bfe6c53630 2012-10-12 13:55:53 -07:00
Alejandro Murillo
62bcdf7ecd Merge 2012-10-12 13:55:52 -07:00
Gary Collins
3a32124e5c Merge 2012-10-12 11:31:27 -07:00
Gary Collins
ad3844358d Merge 2012-10-12 10:49:39 -07:00
Vladimir Kozlov
5f132a5ec3 Merge 2012-10-12 09:22:52 -07:00
Konstantin Shefov
2cae43552d 7184326: TEST_BUG: java/awt/Frame/7024749/bug7024749.java has a typo
Reviewed-by: anthony
2012-10-12 18:46:15 +04:00
Lana Steuck
05990a73d8 Merge 2012-10-11 17:00:54 -07:00
Lana Steuck
967c2d5685 Merge 2012-10-11 16:59:50 -07:00
Lana Steuck
7a8796bd49 Merge 2012-10-11 16:57:31 -07:00
Lance Andersen
2a56b6aa5a 8000763: use XXX.valueOf methods instead of constructors
Reviewed-by: mchung, forax
2012-10-11 18:46:31 -04:00
Abhijit Saha
6412317f9a Merge 2012-10-11 15:30:23 -07:00
Abhijit Saha
402fd01231 Merge 2012-10-11 15:29:16 -07:00
Christian Thalinger
222b2457ed 8000740: remove LinkWellKnownClasses
Reviewed-by: kvn, jrose
2012-10-11 14:46:20 -07:00
Jiangli Zhou
7757ae0cbf 8000459: assert(java_lang_String::is_instance(entry)) failure with various mlvm tests
Remove unneeded assert.

Reviewed-by: sspitsyn, coleenp
2012-10-11 14:36:46 -04:00
Rob McKenna
7b940bac40 7152183: TEST_BUG: java/lang/ProcessBuilder/Basic.java failing intermittently [sol]
Reviewed-by: alanb, martin, dholmes
2012-10-11 18:24:38 +01:00
David Katleman
7724283600 Added tag jdk8-b60 for changeset e8ce51f159dd 2012-10-11 09:50:52 -07:00
David Katleman
dd1899ba62 Added tag jdk8-b60 for changeset fd85bb97232e 2012-10-11 09:50:14 -07:00
David Katleman
7778b7d006 Added tag jdk8-b60 for changeset ad9498bbcc27 2012-10-11 09:49:47 -07:00
David Katleman
6380aca7b2 Added tag jdk8-b60 for changeset 77de918f1de3 2012-10-11 09:49:41 -07:00
David Katleman
2f003be07e Added tag jdk8-b60 for changeset 2805a3e211f3 2012-10-11 09:49:18 -07:00
David Katleman
afe29376fe Added tag jdk8-b60 for changeset 708d4b770214 2012-10-11 09:49:03 -07:00
David Katleman
d78b757097 Added tag jdk8-b60 for changeset a11476021d05 2012-10-11 09:48:55 -07:00
Roland Westrelin
74ea92ce42 8000753: compiler/6912517 crashes on 64bit sparc with compressed oops off
Code generated by c1 for getClass intrinsic broken when klass field is loaded on 64bit with compressed klass off.

Reviewed-by: kvn
2012-10-11 18:21:01 +02:00
Dan Xu
6e283062c6 7186817: Remove Windows 95/98/ME Support
Reviewed-by: alanb
2012-10-11 11:47:05 +01:00
Jonathan Gibbons
ec5ee59931 8000310: Clean up use of StringBuffer in langtools
Reviewed-by: bpatel
2012-10-10 18:44:21 -07:00
Jonathan Gibbons
8b895ea856 8000418: javadoc should used a standard "generated by javadoc" string
Reviewed-by: bpatel
2012-10-10 18:34:46 -07:00
Jayashree Viswanathan
9551f94d32 8000743: docencoding not available to stylesheet
Reviewed-by: jjg
2012-10-10 18:08:19 -07:00
Jonathan Gibbons
680ffebcb6 8000665: fix "internal API" comments on javadoc files
Reviewed-by: darcy
2012-10-10 16:48:21 -07:00
David Katleman
257d0ce0f2 Merge 2012-10-10 14:47:07 -07:00
Lance Andersen
a446a98f53 8000712: Remove unused fields in SyncFactory
Reviewed-by: mchung
2012-10-10 17:34:27 -04:00
Abhijit Saha
93e31619c4 Merge 2012-10-10 14:31:07 -07:00
Abhijit Saha
2f3ac59e81 Merge 2012-10-10 14:28:08 -07:00
Alan Bateman
d1635b4499 7192274: Deprecate LogManager addPropertyChangeListener and removePropertyChangeLister methods
Reviewed-by: mchung, lancea, chegar
2012-10-10 20:47:12 +01:00
Joseph Provino
c5eaaaa070 7189254: Change makefiles for more flexibility to override defaults
Change makefiles so that targets and parameters can be overridden by alternate makefiles.

Reviewed-by: dholmes, coleenp
2012-10-10 14:35:58 -04:00
Lance Andersen
2a6e8cc962 8000687: Correct javadoc typo for getLogWriter and setLogWriter
Reviewed-by: alanb
2012-10-10 11:15:27 -04:00
Jonathan Gibbons
b155b54a5e 8000208: fix langtools javadoc comment issues
Reviewed-by: bpatel, mcimadamore
2012-10-09 19:31:58 -07:00
Jonathan Gibbons
36c3915257 8000663: clean up langtools imports
Reviewed-by: darcy
2012-10-09 19:10:00 -07:00
Goetz Lindenmaier
f28ac57f94 8000592: Improve adlc usability
Several changes to adlc to improve its usability

Reviewed-by: kvn
2012-10-09 16:09:31 -07:00
Joe Wang
0b25975fcd 8000172: 2 SAX features does not work properly
When external dtd is not loaded, skippedEntity event should be reported for entity references.

Reviewed-by: lancea
2012-10-09 14:19:11 -07:00
Stefan Karlsson
724e5ecfb3 8000659: NPG: ClassCastExceptions are unexpectedly thrown when testing nashorn
Treat the oops in invoke_method_table() as strong roots when ClassUnloading is enabled.

Reviewed-by: kamg, coleenp
2012-10-09 22:12:25 +02:00
Vladimir Ivanov
6674423523 7199654: Remove LoadUI2LNode
Removed LoadUI2L node from Ideal nodes, use match rule in .ad files instead.

Reviewed-by: kvn
2012-10-09 12:40:05 -07:00
Sean Coffey
63128f0e6d 7196086: update copyright years for files in corba repository (JDK 8)
Reviewed-by: lancea
2012-10-09 20:14:36 +01:00
Sean Coffey
23b1ff04af 7181793: Socket getOutputStream create streams that cannot be GC'ed until Socket is closed
Reviewed-by: alanb, chegar
2012-10-09 19:45:17 +01:00
Mikael Vidstedt
769dd50182 7197424: update copyright year to match last edit in jdk8 hotspot repository
Update copyright year to 2012 for relevant files

Reviewed-by: dholmes, coleenp
2012-10-09 10:09:34 -07:00
Leonid Romanov
743e5c0d91 7124321: [macosx] TrayIcon MouseListener is never triggered
Reviewed-by: anthony
2012-10-09 20:59:41 +04:00
Naoto Sato
04816adee5 7200341: DateFormatSymbols.hashCode() throws ArrayIndexOutOfBoundsException in some circumstances
Reviewed-by: okutsu
2012-10-09 09:59:05 -07:00
Leonid Romanov
63a30e3268 7185280: Jre7cert: focusgained does not get called for all focus req when do alt + tab
Reviewed-by: anthony
2012-10-09 18:00:58 +04:00
Lance Andersen
2a3853c1b9 7197395: Add @Deprecated to all deprecated methods to eliminate compiler warnings in JDBC
Reviewed-by: alanb, smarks
2012-10-09 08:58:27 -04:00
Alan Bateman
511c6abf08 7173494: some jdk tests are not run in test/Makefile
Reviewed-by: chegar, mchung, mduigou, iris
2012-10-09 13:28:32 +01:00
Alan Bateman
b807a9bf59 7173494: some jdk tests are not run in test/Makefile
Reviewed-by: chegar, mchung, mduigou, iris
2012-10-09 13:25:27 +01:00
Sean Coffey
fb1294fec5 7196533: TimeZone.getDefault() slow due to synchronization bottleneck
Reviewed-by: okutsu
2012-10-09 12:50:52 +01:00
Roland Westrelin
61eb5a0549 7054512: Compress class pointers after perm gen removal
Support of compress class pointers in the compilers.

Reviewed-by: kvn, twisti
2012-10-09 10:11:38 +02:00
Mark Wielaard
ec0a9ee8a6 8000622: Forgot to hg add and check in test for JDK-7170638
Add the test

Reviewed-by: coleenp, kamg
2012-10-09 02:42:16 -04:00
David Holmes
183fdef181 8000461: Top level build doesn't pass OPENJDK=true through to the hotspot build
Add OPENJDK to the COMMON_BUILD_ARGUMENTS

Reviewed-by: tbell
2012-10-09 02:08:54 -04:00
Rickard Bäckman
25e07fb041 Merge 2012-10-09 07:41:27 +02:00
Christian Thalinger
7162ad011c 8000263: JSR 292: signature types may appear to be unloaded
Reviewed-by: kvn, jrose
2012-10-08 17:04:00 -07:00
Yumin Qi
92e727c8e4 Merge 2012-10-08 16:59:44 -07:00
Yumin Qi
b2cf8c4cb0 8000332: SA ClassDump throws exception after permgen removal
In ClassWrite.writeFields(), fields count was mistakenly set to fields length which overflow the array index. Also removed a file which is leftover from 6879063 changeset.

Reviewed-by: coleenp, sspitsyn
2012-10-08 16:48:52 -07:00
Lana Steuck
babd792880 Merge 2012-10-08 15:40:27 -07:00
Lana Steuck
703702096b Merge 2012-10-08 15:39:33 -07:00
Lana Steuck
e99b3f4ffe Merge 2012-10-08 15:38:19 -07:00
Lana Steuck
e86fa474a7 Merge 2012-10-08 15:37:37 -07:00
Lana Steuck
6bf8610fc8 Merge 2012-10-08 15:36:02 -07:00
Vladimir Ivanov
b1d745897b 8000313: C2 should use jlong for 64bit values
Replace all occurrences of long with jlong in C2 code.

Reviewed-by: kvn, twisti
2012-10-08 13:02:13 -07:00
Mikael Gerdin
845106af13 8000358: G1: metaspace information not printed in PrintHeapAtGC output nor in hs_err file
Missing call to MetaspaceAux::print_on() in G1CollectedHeap::print_on().

Reviewed-by: azeemj, jmasa
2012-10-08 09:12:31 -07:00
Mark Wielaard
959d0a9ebb 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field
Don't use HS_DTRACE_PROBE_CDECL_N and HS_DTRACE_PROBE_N directly.

Reviewed-by: coleenp, kamg, dholmes, sspitsyn
2012-10-08 09:18:54 -04:00
Weijun Wang
a5312cbadb 7201053: Krb5LoginModule shows NPE when both useTicketCache and storeKey are set to true
Reviewed-by: mullan
2012-10-08 10:42:43 +08:00
Alan Bateman
18688c3a56 8000354: (props) Properties.storeToXML/loadFromXML need to allow for alternative implementations
Reviewed-by: mchung, forax
2012-10-06 13:56:16 +01:00
Maurizio Cimadamore
319150fde0 7177386: Add attribution support for method references
Add type-checking/lookup routines for method references

Reviewed-by: jjg, dlsmith
2012-10-06 10:35:38 +01:00
Kaushik Srenevasan
fd15ca5e44 7127708: G1: change task num types from int to uint in concurrent mark
Change the type of various task num fields, parameters etc to unsigned and rename them to be more consistent with the other collectors. Code changes were also reviewed by Vitaly Davidovich.

Reviewed-by: johnc
2012-10-06 01:17:44 -07:00
Vladimir Ivanov
2467d2f247 8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
Prepend '.' to the existing native library path

Reviewed-by: kvn, sspitsyn
2012-10-05 19:44:49 -07:00
Vladimir Ivanov
81be4b2f15 8000232: NPG: SIGSEGV in Dependencies::DepStream::check_klass_dependency on solaris-x64
Move decoding into Dependencies::DepStream::argument, so no caller could see encoded context value (NULL) anymore.

Reviewed-by: twisti, kvn
2012-10-05 19:29:29 -07:00
Vladimir Ivanov
822deb6ee6 7177003: C1: LogCompilation support
Add LogCompilation support in C1 - both client and tiered mode.

Reviewed-by: twisti, kvn
2012-10-05 18:57:10 -07:00
Bhavesh Patel
83042670bb 4696488: javadoc doesn't handle UNC paths for destination directory
Reviewed-by: jjg
2012-10-05 14:21:09 -07:00
Bhavesh Patel
8949fccef9 7068595: html files in class-use dir do not get loaded correctly when Frames link is clicked
Reviewed-by: jjg
2012-10-05 14:16:32 -07:00
Bhavesh Patel
b32f33b69a 7132631: The help-doc.html generates an invalid link to constant-values.html
Reviewed-by: jjg
2012-10-05 14:13:47 -07:00
Alejandro Murillo
9e9db7f831 8000498: new hotspot build - hs25-b05
Reviewed-by: jcoomes
2012-10-05 13:37:08 -07:00
Alejandro Murillo
10f5782aff Added tag hs25-b04 for changeset 21b044417a2e 2012-10-05 13:28:17 -07:00
Alejandro Murillo
81a35920fd Merge 2012-10-05 13:28:16 -07:00
Vladimir Kozlov
85e21b3a30 Merge 2012-10-05 10:03:56 -07:00
Naoto Sato
eeac68872b 7198834: HOST Adapter: one extra empty space in the end of the pattern string
Reviewed-by: okutsu
2012-10-05 09:57:50 -07:00
Jaroslav Bachorik
496da3014d 7195779: javax/management/remote/mandatory/threads/ExecutorTest.java fails intermittently, NPE in tie class
Reviewed-by: alanb, coffeys
2012-10-05 15:08:10 +01:00
Maurizio Cimadamore
72f39bf20c 7177385: Add attribution support for lambda expressions
Add support for function descriptor lookup, functional interface inference and lambda expression type-checking

Reviewed-by: jjg, dlsmith
2012-10-05 14:35:24 +01:00
Vadim Pakhnushev
4e6d9a8f7e 8000176: Need automated test for checking scale quality
Reviewed-by: prr, bae
2012-10-05 16:21:01 +04:00
Naoto Sato
0dcbdaafba Merge 2012-10-04 21:05:06 -07:00
Naoto Sato
efea116274 7200119: Collator.getAvailableLocales() doesn't return Locale.US
Reviewed-by: okutsu
2012-10-04 21:03:36 -07:00
David Holmes
5ad6116c61 Merge 2012-10-04 20:09:46 -04:00
David Holmes
363fac131c 7199186: runtime/7194254/Test7194254.java fails - wrong test name on @run
Reviewed-by: kvn, twisti
2012-10-04 19:52:09 -04:00
David Katleman
01465313ff Added tag jdk8-b59 for changeset aded5e617602 2012-10-04 14:36:14 -07:00
David Katleman
ab2c8f811a Added tag jdk8-b59 for changeset 6408a49a3a6b 2012-10-04 14:35:38 -07:00
David Katleman
c12876f991 Added tag jdk8-b59 for changeset 6fa036b39eb9 2012-10-04 14:35:15 -07:00
David Katleman
56e12ecc3a Added tag jdk8-b59 for changeset e31f9b0d349f 2012-10-04 14:35:10 -07:00
David Katleman
a09b38f3e4 Added tag jdk8-b59 for changeset 22fa34424aa9 2012-10-04 14:34:51 -07:00
David Katleman
f67940dd4b Added tag jdk8-b59 for changeset 173d83d9c9d7 2012-10-04 14:34:34 -07:00
David Katleman
447af5923f Added tag jdk8-b59 for changeset ba9e9ff8d8ef 2012-10-04 14:34:31 -07:00
Jon Masamitsu
f33eb9a9bd Merge 2012-10-04 14:01:07 -07:00
Rob McKenna
2102c5a5b6 7184932: Remove the temporary Selector usage in the NIO socket adapters
Reviewed-by: alanb
2012-10-04 19:53:08 +01:00
Jon Masamitsu
4fa0ac5256 7198873: NPG: VM Does not unload classes with UseConcMarkSweepGC
Reviewed-by: johnc, mgerdin, jwilhelm
2012-10-04 10:40:23 -07:00
Naoto Sato
3caba25f6b 7196799: CLDR adapter can not be invoked when region code is specified in Locale
7197573: java/util/Locale/LocaleProviders.sh failed

Reviewed-by: okutsu
2012-10-04 10:04:56 -07:00
John Cuthbertson
ed98ea0a88 8000311: G1: ParallelGCThreads==0 broken
Divide by zero error, if ParallelGCThreads is 0, when adjusting the PLAB size.

Reviewed-by: jmasa, jcoomes
2012-10-04 10:04:13 -07:00
Nils Eliasson
e228ec4078 8000102: Resolve include conflicts
Removing include of c1/c1_runtime.hpp and opto/runtime.hpp from all os-files.

Reviewed-by: kvn
2012-10-04 06:31:07 -07:00
Harold Seigel
284879b3fc 6884973: java -XX:Atomics=2 crashes
Remove buggy experimental option

Reviewed-by: acorn, coleenp
2012-10-04 08:43:14 -04:00
Harold Seigel
5a5c90dd1c 7198519: Broken build, hotspot-rt win USE_PRECOMPILED_HEADER=0
Uncommented out include for sys/stat.h and deleted include statements that were commented out.

Reviewed-by: coleenp, acorn, dholmes
2012-10-04 08:38:06 -04:00
Maurizio Cimadamore
c0e2ed86c1 7177387: Add target-typing support in method context
Add support for deferred types and speculative attribution

Reviewed-by: jjg, dlsmith
2012-10-04 13:04:53 +01:00
Vinnie Ryan
d44a2451e6 Merge 2012-10-04 11:54:16 +01:00
Yuka Kamiya
700a5c6ee0 7201151: Fix Contribution : Java cannot get Windows's IME name correctly
Reviewed-by: okutsu
2012-10-04 18:05:37 +09:00
Yuka Kamiya
64b949310f 7196316: Wrong rounding mode in DecimalFormat after deserialization
Reviewed-by: okutsu
2012-10-04 11:36:22 +09:00
David Katleman
9a3320a64e Merge 2012-10-03 15:31:59 -07:00
Jesper Wilhelmsson
3506d44c57 8000351: Tenuring threshold should be unsigned
Change the flags and variables related to tenuring threshold to be unsigned

Reviewed-by: jmasa, johnc
2012-10-03 20:31:41 +02:00
Oleg Pekhovskiy
ebff918cc7 7171412: awt Choice doesn't fire ItemStateChange when selecting item after select() call
Reviewed-by: art, denis
2012-10-03 21:01:47 +04:00
Jon Masamitsu
88ab075a6d 7199349: NPG: PS: Crash seen in jprt
Reviewed-by: johnc
2012-10-03 08:08:52 -07:00
Dan Xu
684361a3d9 6910472: Typo in : java.io.ObjectOutputStream.reset() "refered"
Reviewed-by: dholmes, alanb
2012-10-03 09:03:53 +01:00
Yuka Kamiya
c3026d4a59 7104012: AIOOBE from RuleBasedBreakIterator.lookupState for some suppl. chars
Reviewed-by: okutsu
2012-10-03 15:11:28 +09:00
Vladimir Kozlov
8d8d00ff00 7199742: A lot of C2 OSR compilations of the same method's bci
Don't clone head of OSR loop.

Reviewed-by: jrose, twisti
2012-10-02 14:49:21 -07:00
Vladimir Kozlov
e8332c76e9 7201026: add vector for shift count
Add generation of vectors for scalar shift count.

Reviewed-by: roland, twisti, dlong
2012-10-02 12:25:13 -07:00
Alan Bateman
30d429cc25 8000268: sun/security/provider/X509Factory/BigCRL.java failing on Linux 32-bit
Reviewed-by: mullan
2012-10-02 12:23:16 +01:00
Paul Sandoz
25c830b9d5 7197642: (sl) ServiceLoader.load(null) doesn't throw NPE
Reviewed-by: alanb
2012-10-02 10:36:05 +01:00
Olivier Lagneau
b6ea800f9b 7050528: Improve performance of java.text.DecimalFormat.format() call stack
Reviewed-by: darcy
2012-10-02 10:11:57 +01:00
Christian Thalinger
59b8489a0c 7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
Reviewed-by: jrose, kvn
2012-10-01 14:50:10 -07:00
Clemens Eisserer
3d880fa194 7188093: closed/sun/java2d/pipe/ScaleQualityTest.java fails
Reviewed-by: prr, flar
2012-10-01 13:07:54 -07:00
Alan Bateman
9b8e06e699 8000269: Cleanup javadoc warnings
Reviewed-by: lancea, darcy, ulfzibis, iris, naoto, dholmes
2012-10-01 15:36:57 +01:00
Stefan Karlsson
7ccbee4177 8000228: Missing call to cr() when printing entry_point in nmethod, in os::print_location
Reviewed-by: brutisso, neliasso
2012-10-01 13:29:11 +02:00
Stefan Karlsson
3e967d8f8d 8000227: [obj|type]ArrayKlass::oop_print_on prints one line to tty instead of the provided output stream
Reviewed-by: brutisso, sla, jmasa, coleenp
2012-10-01 13:29:11 +02:00
Kevin Walls
80d5f4b66d 7200145: runtime/7196045/Test7196045.java fails with No class provided for `main'
Reviewed-by: dholmes, dsamersoff
2012-09-30 23:24:12 +01:00
Jan Lahoda
ed2bca8140 7198582: (java) Minor refactor of JavacParser
Reviewed-by: jjg, ksrini
2012-09-29 09:00:58 -07:00
Dmitry Samersoff
8af0bcb7fe 7186723: TEST_BUG: Race condition in sun/management/jmxremote/startstop/JMXStartStopTest.sh
Make test self-terminating and independent to cygwin/mks kill behaviour

Reviewed-by: sspitsyn, alanb
2012-09-29 15:44:06 +04:00
Coleen Phillimore
28047d6a0f 8000213: NPG: Should have renamed arrayKlass and typeArrayKlass
Capitalize these metadata types (and objArrayKlass)

Reviewed-by: stefank, twisti, kvn
2012-09-29 06:40:00 -04:00
Lana Steuck
b3aacc5029 Merge 2012-09-28 14:57:31 -07:00
Lana Steuck
4156261cf3 Merge 2012-09-28 14:56:38 -07:00
Alejandro Murillo
9972f3d338 8000251: new hotspot build - hs25-b04
Reviewed-by: jcoomes
2012-09-28 14:36:20 -07:00
Alejandro Murillo
10e48f968d Added tag hs25-b03 for changeset 4d2ca6fb1285 2012-09-28 13:39:41 -07:00
Lana Steuck
80b413a5b5 Merge 2012-09-28 11:45:43 -07:00
Joel Borggrén-Franck
1c489c5ec5 7199925: Separate compilation breaks check that elements have a default for the containing annotation
Reviewed-by: jjg, mcimadamore
2012-09-28 11:39:29 -07:00
Lana Steuck
9c0a331d78 Merge 2012-09-28 10:54:12 -07:00
Maurizio Cimadamore
8fbd614bf3 8000241: langtools doesn't build
Bad merge with langtools tip caused build glitch

Reviewed-by: jjg
2012-09-28 18:50:40 +01:00
Vladimir Kozlov
fbd1f6e3be Merge 2012-09-28 10:16:29 -07:00
Maurizio Cimadamore
7f58c7c7ad 8000233: Fix issues in recent push
Forgot to incorporate review comments in pushed changesets

Reviewed-by: jjg
2012-09-28 16:56:53 +01:00
Stefan Karlsson
ddd6138b95 8000230: Change os::print_location to be more descriptive when a location is pointing into an object
Reviewed-by: mgerdin, twisti
2012-09-28 15:34:32 +02:00
Stefan Karlsson
74f09797c9 Merge 2012-10-01 11:07:31 +02:00
Stefan Karlsson
ebb8d12592 Merge 2012-09-28 14:14:25 +02:00
Alexander Scherbatiy
01025ec99e 7197619: Using modifiers for the dead key detection on Windows
Reviewed-by: bagiras, leonidr
2012-09-28 14:54:04 +04:00
Dan Xu
f41a30cb5c 6950237: Test java/nio/file/Path/CopyAndMove.java does not work correctly when test dir in on VFAT
Reviewed-by: alanb
2012-09-28 11:14:20 +01:00
Weijun Wang
7ffcd7343f 7200682: TEST_BUG: keytool/autotest.sh still has problems with libsoftokn.so
Reviewed-by: alanb, smarks
2012-09-28 17:15:48 +08:00
Yuka Kamiya
5a3a2dc308 7069824: Support for BCP47 locale matching
Reviewed-by: naoto, okutsu
2012-09-28 14:14:26 +09:00
Rob McKenna
152b0d6143 7199219: Proxy-Connection headers set incorrectly when a HttpClient is retrieved from the Keep Alive Cache
Reviewed-by: chegar
2012-09-28 04:39:02 +01:00
Vladimir Kozlov
d560ac115b 7198084: NPG: distance is too big for short branches in test_invocation_counter_for_mdp()
Use long branches in test_invocation_counter_for_mdp()

Reviewed-by: twisti
2012-09-27 15:49:48 -07:00
John Cuthbertson
157b8fa41b 7200261: G1: Liveness counting inconsistencies during marking verification
The clipping code in the routine that sets the bits for a range of cards, in the liveness accounting verification code was incorrect. It set all the bits in the card bitmap from the given starting index which would lead to spurious marking verification failures.

Reviewed-by: brutisso, jwilhelm, jmasa
2012-09-27 15:44:01 -07:00
Rob McKenna
80d3fce897 7199862: Make sure that a connection is still alive when retrieved from KeepAliveCache in certain cases
Reviewed-by: chegar
2012-09-27 22:35:07 +01:00
David Katleman
20911d0ab6 Added tag jdk8-b58 for changeset a54f29461808 2012-09-27 11:26:04 -07:00
David Katleman
575a9f82e2 Added tag jdk8-b58 for changeset 17beb247c83a 2012-09-27 11:25:26 -07:00
David Katleman
d719297988 Added tag jdk8-b58 for changeset e033f1ff319a 2012-09-27 11:25:01 -07:00
David Katleman
b62f8968fe Added tag jdk8-b58 for changeset 63e6a7c76188 2012-09-27 11:24:55 -07:00
David Katleman
291e3f0b9a Added tag jdk8-b58 for changeset f75a1b3efb69 2012-09-27 11:24:35 -07:00
David Katleman
6aeb6eaccb Added tag jdk8-b58 for changeset 84521b7fdb66 2012-09-27 11:24:19 -07:00
David Katleman
ad23559529 Added tag jdk8-b58 for changeset fc1beab39b2a 2012-09-27 11:24:12 -07:00
Andrew John Hughes
0fa038b4e0 7201205: Add Makefile configuration option to build with unlimited crypto in OpenJDK
Allow OpenJDK to use the unlimited crypto policy.

Reviewed-by: wetmore, ohair
2012-09-27 17:55:10 +01:00
Bharadwaj Yadavalli
d5d2e78faa 7193318: C2: remove number of inputs requirement from Node's new operator
Deleted placement new operator of Node - node(size_t, Compile *, int).

Reviewed-by: kvn, twisti
2012-09-27 09:38:42 -07:00
Dmitry Samersoff
47a8760b93 Merge 2012-09-27 20:22:57 +04:00
Alan Bateman
903c4c0c7f 7200742: (se) Selector.select does not block when starting Coherence (sol)
Reviewed-by: chegar
2012-09-27 10:30:56 +01:00
David Katleman
cec06a0b40 Merge 2012-09-26 22:22:51 -07:00
Xue-Lei Andrew Fan
9c642ad1d2 7200295: CertificateRequest message is wrapping when using large numbers of Certs
Reviewed-by: wetmore
2012-09-26 21:05:40 -07:00
Alejandro Murillo
7be853ba86 Merge 2012-09-26 13:04:06 -07:00
Abhijit Saha
989c8e0201 7199488: [TEST] runtime/7158800/InternTest.java failed due to false-positive on PID match
Reviewed-by: coleenp
2012-09-26 09:54:11 -07:00
Alexander Scherbatiy
8bb2411d34 7124515: [macosx] Test fail like 6366126 (ArrayIndexOutOfBoundException pressing ENTER after removing items)
Reviewed-by: serb, anthony
2012-09-26 18:59:12 +04:00
Maurizio Cimadamore
5f629e503c 7188968: New instance creation expression using diamond is checked twice
Unify method and constructor check logic

Reviewed-by: jjg
2012-09-26 14:22:41 +01:00
Vladimir Kozlov
973fdc81a1 7200264: 7192963 changes disabled shift vectors
Replaced is_vector_use() call with explicit check for vector shift's count.

Reviewed-by: twisti, roland, dlong, vlivanov
2012-09-25 15:48:17 -07:00
Jonathan Gibbons
6a310eb049 7196464: upgrade JavaCompiler.shouldStopPolicy to accomodate policies in face of error and no error
Reviewed-by: mcimadamore
2012-09-25 13:11:05 -07:00
Vicente Romero
c2e8d5a017 7193657: provide internal ArrayUtils class to simplify common usage of arrays in javac
Reviewed-by: mcimadamore, jjg
2012-09-25 13:06:58 -07:00
Abhijit Saha
7bd671250d Merge 2012-09-25 11:48:00 -07:00
Abhijit Saha
bd3cd1709f Merge 2012-09-25 11:47:04 -07:00
Valerie Peng
6f6f1d3bea 7199939: DSA 576 and 640 bit keys fail when initializing for No precomputed parameters
Fixed initialize(int, SecureRandom) call to not error out when no precomputed params available.

Reviewed-by: vinnie
2012-09-25 11:31:17 -07:00
Valerie Peng
0733ebe2f2 7199941: test about AES/ECB mode fails
Fixed the problem of field "blockMode" not having correct value for AES algorithms.

Reviewed-by: vinnie
2012-09-25 11:27:42 -07:00
Vladimir Kozlov
9c3545d4fb 7200233: C2: can't use expand rules for vector instruction rules
Added missed _bottom_type set in ArchDesc::defineExpand() and missed vector nodes in MatchRule::is_vector().

Reviewed-by: twisti, roland, dlong
2012-09-25 10:41:15 -07:00
Bengt Rutisson
ceccaf4577 Merge 2012-09-25 18:28:16 +02:00
Jennifer Godinez
5f949b5751 7158350: [macosx] Strange results of SwingUIText printing
Reviewed-by: bae, prr
2012-09-25 09:18:27 -07:00
Jon Masamitsu
1ea36e2324 7200615: NPG: optimized VM build is broken
Reviewed-by: kvn
2012-09-25 07:05:55 -07:00
Bengt Rutisson
fcae0353d2 7200470: KeepAliveClosure not needed in CodeCache::do_unloading
Removed the unused keep_alive parameter

Reviewed-by: stefank, dholmes, kamg, coleenp
2012-09-25 14:58:12 +02:00
Fredrik Ohrstrom
70f397b4a2 7200065: Cross-compilation changes to support the new-build
Reviewed-by: dholmes, ohair
2012-09-25 07:58:42 -04:00
Maurizio Cimadamore
f49f25c60d 7177306: Regression: unchecked method call does not erase return type
Spurious extra call to Attr.checkMethod when method call is unchecked

Reviewed-by: jjg, dlsmith
2012-09-25 11:56:46 +01:00
Maurizio Cimadamore
d4c5fca16a 7175433: Inference cleanup: add helper class to handle inference variables
Add class to handle inference variables instantiation and associated info

Reviewed-by: jjg, dlsmith
2012-09-25 11:55:34 +01:00
Maurizio Cimadamore
07155682a1 7194586: Add back-end support for invokedynamic
Add support for invokedynamic bytecode instruction; includes suppot for generation of all related classfile attributes

Reviewed-by: jjg
2012-09-25 11:53:18 +01:00
Maurizio Cimadamore
8be3009d08 7193913: Cleanup Resolve.findMethod
Refactor method lookup logic in Resolve.findMethod

Reviewed-by: jjg
2012-09-25 11:52:37 +01:00
Lana Steuck
8cdc205b73 Merge 2012-09-24 21:11:11 -07:00
Lana Steuck
74be91da45 Merge 2012-09-24 21:10:24 -07:00
Yumin Qi
d540138a54 Merge 2012-09-24 20:04:19 -07:00
Vladimir Danushevsky
2e051041e3 Merge 2012-09-24 19:00:55 -04:00
Jonathan Gibbons
55ec94e302 7196462: JavacProcessingEnvironment should tolerate BasicJavacTask
Reviewed-by: mcimadamore
2012-09-24 14:04:34 -07:00
Yumin Qi
22544e7a7c 6879063: SA should use hsdis for disassembly
We should in SA to use hsdis for it like the JVM does to replace the current java based disassembler.

Reviewed-by: twisti, jrose, sla
2012-09-24 12:44:00 -07:00
Sergey Bylokhov
08c6d03264 7160627: [macosx] TextArea has wrong initial size
7124213: [macosx] pack() does ignore size of a component; doesn't on the other platforms

Reviewed-by: anthony, art
2012-09-24 21:33:41 +04:00
Leonid Romanov
914bc61d4b 7179349: [macosx] Java processes on Mac should not use default Apple icon
Reviewed-by: anthony
2012-09-24 18:24:30 +04:00
Jaroslav Bachorik
12bf2c7d52 7192975: Issue with JMX reflection
Make security check unconditional

Reviewed-by: ahgross, asaha
2012-09-24 17:00:40 +04:00
Frederic Parain
898b21ebf3 7198296: Problem with classloader in JMX
Wb classes have to be available for hotspot tests

Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Reviewed-by: ahgross, asaha
2012-09-24 16:15:27 +04:00
Leonid Romanov
0ea3bcf8a8 7124239: [macosx] sun.awt.SunToolkit.InfiniteLoop exception in realSync called from SwingTestHelper
Reviewed-by: anthony
2012-09-24 15:25:17 +04:00
Alejandro Murillo
d6538dc298 7200236: new hotspot build - hs25-b03
Reviewed-by: jcoomes
2012-09-21 14:39:56 -07:00
Alejandro Murillo
38c34d56b0 Added tag hs25-b02 for changeset b3b50cc0cb4d 2012-09-21 14:02:58 -07:00
Alejandro Murillo
6f3e1a0593 Merge 2012-09-21 14:02:57 -07:00
John Coomes
8cc4cb76b5 Merge 2012-09-21 13:14:22 -07:00
Kelly O'Hair
89f1772d07 7191703: jprt cannot build jdk on MacOSX
Reviewed-by: anthony
2012-09-21 12:22:52 -07:00
Alan Bateman
360754471c 7199551: (bf) CharBuffer.append(CharSequence) throws BufferOverflowException for read-only buffer
Reviewed-by: iris, dxu, chegar
2012-09-21 15:39:10 +01:00
Alexander Scherbatiy
aca74a151c 7199180: [macosx] Dead keys handling for input methods
Reviewed-by: kizune, anthony
2012-09-21 13:48:06 +04:00
Nils Loodin
8bc04a0b28 7200092: Make NMT a bit friendlier to work with
Reviewed-by: kvn, ysr, azeemj
2012-09-21 10:56:28 +02:00
John Coomes
1743a11163 7199082: write warning messages to stderr
Reviewed-by: ysr, dholmes, sla
2012-09-20 16:27:51 -07:00
John R Rose
0a735e76f6 7196190: Improve method of handling MethodHandles
Bind callers to caller-sensitive methods.

Reviewed-by: twisti, jjh, vlivanov, ahgross
2012-09-20 14:02:55 -07:00
Jon Masamitsu
5721eadb16 Merge 2012-09-20 13:49:27 -07:00
David Katleman
73016372e3 Added tag jdk8-b57 for changeset a4e282e892b6 2012-09-20 13:45:59 -07:00
David Katleman
10d4078b95 Added tag jdk8-b57 for changeset ad1e86451b3f 2012-09-20 13:45:18 -07:00
David Katleman
685f6679fe Added tag jdk8-b57 for changeset 8ac23c0c609c 2012-09-20 13:44:53 -07:00
David Katleman
1672690b20 Added tag jdk8-b57 for changeset 61be07ec4655 2012-09-20 13:44:47 -07:00
David Katleman
1f784d2ce5 Added tag jdk8-b57 for changeset 386342128efe 2012-09-20 13:44:28 -07:00
David Katleman
6da011c932 Added tag jdk8-b57 for changeset 9674d32cdc2a 2012-09-20 13:44:07 -07:00
David Katleman
638632979d Added tag jdk8-b57 for changeset b3dd9df01aa0 2012-09-20 13:44:03 -07:00
Kumar Srinivasan
71637b6902 7199614: (pack200) remove unused file
Reviewed-by: alanb
2012-09-20 13:01:01 -07:00
Jon Masamitsu
f6cc90e927 7199923: NPG: tools/javac/T7093325.java timeout
Reviewed-by: stefank, coleenp, kvn
2012-09-20 12:18:23 -07:00
John Cuthbertson
54412491e8 7190666: G1: assert(_unused == 0) failed: Inconsistency in PLAB stats
Reset the fields in ParGCAllocBuffer, that are used for accumulating values for the ResizePLAB sensors in PLABStats, to zero after flushing the values to the PLABStats fields. Flush PLABStats values only when retiring the final allocation buffers prior to disposing of a G1ParScanThreadState object, rather than when retiring every allocation buffer.

Reviewed-by: jwilhelm, jmasa, ysr
2012-09-20 09:52:56 -07:00
Vladislav Karnaukhov
211c061e3e 7123767: Wrong tooltip location in Multi-Monitor configurations
Reviewed-by: rupashka
2012-09-20 17:55:40 +04:00
Sean Chou
49aa62455c 7194184: JColorChooser swatch cannot accessed from keyboard
Reviewed-by: rupashka, alexsch
2012-09-20 17:39:47 +04:00
John Zavgren
374a36e20e 7193520: Removed references to Linux kernel version 2.2
Linux kernel version 2.2 isn't supported anymore.

Reviewed-by: chegar, dsamersoff, alanb
2012-09-20 09:36:55 -04:00
Kevin Walls
d37f7326ce Merge 2012-09-20 03:49:15 -07:00
John Cuthbertson
e78edc79b7 7193946: Move warnings associated with UseMemSetInBOT flag
The warnings associated with the UseMemSetInBOT flag are duplicated in CMS and G1. The separate warnings have been removed and single instance of the warning has been placed in a common location.

Reviewed-by: brutisso, ysr
2012-09-19 15:48:02 -07:00
David Katleman
1f5caa619e Merge 2012-09-19 15:47:06 -07:00
David Katleman
d08e6eb258 Merge 2012-09-19 15:46:32 -07:00
David Katleman
5221180d4e Merge 2012-09-19 15:45:53 -07:00
David Katleman
84e2bbbb3c Merge 2012-09-19 15:45:48 -07:00
David Katleman
ffd1ab1498 Merge 2012-09-19 15:44:50 -07:00
David Katleman
3390fc82dd Merge 2012-09-19 15:44:47 -07:00
Bill Pittore
8e0655095b 7195372: Wrong copyright in new files
Fixed copyrights

Reviewed-by: dholmes
2012-09-19 17:22:49 -04:00
Vladimir Kozlov
03d65ced3e 7198606: Improve VM optimization
Remove incorrect code in OptimizeFill optimization.

Reviewed-by: roland, twisti
2012-09-19 13:58:31 -07:00
John Coomes
df3f6e087e Merge 2012-09-19 16:18:55 -04:00
Lana Steuck
15bdd03998 Merge 2012-09-19 12:41:54 -07:00
Lana Steuck
b2e9ddaa89 Merge 2012-09-19 12:38:53 -07:00
Sergey Malenkov
1a3e1b43e0 7195917: XMLDecoder parsing at close-time should be improved
Reviewed-by: art, ahgross
2012-09-19 21:42:21 +04:00
Brandon Mitchell
6573cbf346 7016955: G1: remove the is_zeroed parameter from the HeapRegion constructor
The is_zeroed parameter is no longer used and so can be removed.

Reviewed-by: johnc, jmasa, brutisso
2012-09-19 08:48:10 -07:00
Yumin Qi
124ddb9b47 Merge 2012-09-19 08:41:30 -07:00
Kevin Walls
1c502686ea 7196045: Possible JVM deadlock in ThreadTimesClosure when using HotspotInternal non-public API
Reviewed-by: sspitsyn, dholmes
2012-09-19 15:24:32 +01:00
Chris Hegarty
4752833181 7199500: Minor typo in AbstractStringBuilder.java header
Reviewed-by: coffeys
2012-09-19 14:55:40 +01:00
Jim Gish
ae79d50df2 4722265: (spec str) StringBuffer.ensureCapacity() should mention that capacity is mutable
Add usage note to AbstractStringBuilder ensureCapacity()

Reviewed-by: mduigou, dholmes, chegar
2012-09-19 08:52:21 -04:00
David Holmes
921375e418 7199410: Remove files that were omitted from 7130909 changeset
Reviewed-by: ohair
2012-09-19 04:26:50 -04:00
Jon Masamitsu
37bddeb62b 7045397: NPG: Add freelists to class loader arenas
Reviewed-by: coleenp, stefank, jprovino, ohair
2012-09-18 23:35:42 -07:00
John Coomes
d8089b90e5 Merge 2012-09-18 19:44:39 -04:00
Mandy Chung
8159d98a99 7198070: Eliminate static dependency from JMX to java.beans.ConstructorProperties
Reviewed-by: alanb
2012-09-18 15:06:14 -07:00
Dan Xu
8831f6fde2 7195933: There is incorrect link to "Info-ZIP Application Note 970311" in doc page of Package java.util.zip
Correct a java doc link in java.util.zip package page

Reviewed-by: chegar, lancea, sherman
2012-09-18 14:45:09 -07:00
Jon Masamitsu
cf5f4f736f 7197557: NPG: nsk/sysdict/vm/stress/chain/chain004 hangs intermittently
Reviewed-by: johnc, ysr
2012-09-18 14:15:06 -07:00
Alan Bateman
3b337824c0 7190273: Deprecate com.sun.security.auth.callback.DialogCallbackHandler
Reviewed-by: mullan
2012-09-18 21:21:10 +01:00
Kelly O'Hair
f65906c1bc 7198329: Add $(sort) to object files used in links makes binarties more consistent
Reviewed-by: dholmes, tbell, erikj, ihse, ohrstrom
2012-09-18 13:15:28 -07:00
Kelly O'Hair
d5cd2350a8 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
7130909: Add a more general mechanism for customizing the build logic

Reviewed-by: dholmes, tbell, erikj, ihse, ohrstrom
2012-09-18 12:16:37 -07:00
Zhengyu Gu
b9f111d166 Merge 2012-09-18 11:37:26 -07:00
Kelly O'Hair
25cc8761f1 7197849: Update new build-infra makefiles
Reviewed-by: ihse, erikj, ohrstrom, tbell
2012-09-18 11:29:51 -07:00
Kelly O'Hair
075c55b713 7197849: Update new build-infra makefiles
Reviewed-by: ihse, erikj, ohrstrom, tbell
2012-09-18 11:29:44 -07:00
Kelly O'Hair
28f46567e4 7197849: Update new build-infra makefiles
Reviewed-by: ihse, erikj, ohrstrom, tbell
2012-09-18 11:29:37 -07:00
Kelly O'Hair
aa6143b6c3 7197849: Update new build-infra makefiles
Reviewed-by: ihse, erikj, ohrstrom, tbell
2012-09-18 11:29:31 -07:00
Kelly O'Hair
c363db8ed0 7197849: Update new build-infra makefiles
Reviewed-by: ihse, erikj, ohrstrom, tbell
2012-09-18 11:29:24 -07:00
Kelly O'Hair
228c21635b 7197849: Update new build-infra makefiles
Reviewed-by: ihse, erikj, ohrstrom, tbell
2012-09-18 11:29:16 -07:00
Mike Duigou
1e3c417915 7199249: TEST_BUG : Add /othervm to Collisions.java @run main with -D definitions
Reviewed-by: alanb
2012-09-18 11:04:12 -07:00
Yiming Wang
6b6dde5a11 7198984: Add java/text/Bidi/Bug6665028.java to ProblemList.txt
Reviewed-by: alanb
2012-09-18 10:34:36 -07:00
Kelly O'Hair
b74620c703 Merge 2012-09-18 10:25:20 -07:00
Serguei Spitsyn
3236415bda 7191786: retransformClasses() does not pass in LocalVariableTypeTable of a method
JVMTI REtruncformClasses must support LocalVariableTypeTable attribute

Reviewed-by: dcubed, dsamersoff, rbackman
2012-09-18 10:10:43 -07:00
Xue-Lei Andrew Fan
b8e234fb52 7199066: Typo in method name
Reviewed-by: mullan
2012-09-18 06:51:02 -07:00
Konstantin Shefov
67cc344382 7190587: Open source and jtreg'ify JAWT regression test
Reviewed-by: anthony, omajid
2012-09-18 17:38:40 +04:00
Dan Xu
cd25bf4b6e 7142919: TEST_BUG: java/nio/channels/AsyncCloseAndInterrupt.java failing intermittently [sol11]
Reviewed-by: alanb
2012-09-18 13:14:49 +01:00
Vinnie Ryan
79b3216615 7198901: correct the field size check when decoding a point on ECC curve
Reviewed-by: xuelei
2012-09-18 11:08:48 +01:00
Weijun Wang
89a8feeaff 7198871: cleanup security tests in problem lists with no CR attached
Reviewed-by: alanb
2012-09-18 17:38:43 +08:00
Zhengyu Gu
fb2076c572 7188594: Print statistic collected by NMT with VM flag
Print out statistics of collected NMT data if it is on at VM exits

Reviewed-by: kvn, coleenp, twisti
2012-09-17 16:37:26 -04:00
Zhengyu Gu
3276deb50c Merge 2012-09-17 13:34:07 -07:00
Magnus Ihse Bursie
b2b4d40c73 7172012: Make test-in-build an option (Queens)
Reviewed-by: ohair, dholmes
2012-09-17 11:46:25 -07:00
Mike Duigou
25570f8d69 7198988: re-order paramaters for Collision.java @run
Reviewed-by: alanb
2012-09-17 11:36:10 -07:00
Zhengyu Gu
afd497eecc 7190089: NMT ON: NMT failed assertion on thread's stack base address
Solaris only, record stack info to NMT after stack size adjustment was made for primordial threads

Reviewed-by: kvn, acorn, coleenp
2012-09-17 10:20:04 -04:00
Marco Dinacci
6dc21336ea 7160951: ActionListener called twice for JMenuItem using ScreenMenuBar
Reviewed-by: anthony, serb
2012-09-17 17:25:54 +04:00
David Holmes
676c5a2769 Merge 2012-09-17 08:44:19 -04:00
Dmytro Sheyko
48255b9ff3 7194254: jstack reports wrong thread priorities
Reviewed-by: dholmes, sla, fparain
2012-09-17 07:36:31 -04:00
Staffan Larsen
10b80ccca6 7198849: Make javax/management/remote/mandatory/notif/ListenerScaleTest.java less timing sensitive
Reviewed-by: alanb
2012-09-17 12:40:33 +02:00
Weijun Wang
b86fae01ab 7196855: autotest.sh fails on ubuntu because libsoftokn.so not found
Reviewed-by: vinnie
2012-09-17 18:19:16 +08:00
Staffan Larsen
e91b6584eb 7193201: [OS X] The development launcher should be signed and given task_for_pid privileges
Reviewed-by: sspitsyn, nloodin, mgronlun, coleenp
2012-09-17 11:46:19 +02:00
Vadim Pakhnushev
1c8d337aaa 7186799: Regression tests for ImageIO metadata fail on second run
Reviewed-by: prr, bae
2012-09-17 13:44:07 +04:00
Staffan Larsen
1f8baaf6f0 7198846: Add javax/management/remote/mandatory/notif/DiffHBTest.java to ProblemList.txt
Reviewed-by: alanb
2012-09-17 11:27:25 +02:00
Weijun Wang
8e21ad5768 7198205: CloseTest fails on mac
Reviewed-by: alanb, chegar, michaelm
2012-09-17 17:19:50 +08:00
Bengt Rutisson
a08d48f9b1 7198130: G1: PrintReferenceGC output comes out of order
Move the first part of the GC logging, including timestamp, to the start of the GC

Reviewed-by: johnc, jwilhelm
2012-09-17 10:33:13 +02:00
Coleen Phillimore
9a271f468a 7197269: NPG: FollowReferences has no ClassLoader -> Class link to follow
Restore java/lang/ClassLoader.addClass() upcall

Reviewed-by: sspitsyn, dcubed, jmasa
2012-09-17 10:46:59 -04:00
Sean Mullan
227d6c722e 7195409: CertPath/CertPathValidatorTest/KeyParamsInheritanceTest fails with NullPointerException
Reviewed-by: xuelei
2012-09-16 13:29:25 -07:00
Alejandro Murillo
c188598ddd 7198641: new hotspot build - hs25-b02
Reviewed-by: jcoomes
2012-09-14 22:00:41 -07:00
Alejandro Murillo
a13f8a7da1 Added tag hs25-b01 for changeset ab29bec425bb 2012-09-14 21:50:58 -07:00
Alejandro Murillo
b5637a7e2e Merge 2012-09-14 21:50:58 -07:00
John Coomes
d0d065e65c 7198676: NPG: exclude MemoryMXBean tests which assume a perm gen
Reviewed-by: dcubed
2012-09-14 16:04:01 -07:00
John Coomes
62be90fc38 7198162: exclude test MemoryMXBean/LowMemoryTest2.sh
Reviewed-by: alanb, dsamersoff, sspitsyn
2012-09-14 15:02:24 -07:00
Lana Steuck
a60a81b964 Merge 2012-09-14 14:10:01 -07:00
Lana Steuck
fb9f7dee15 Merge 2012-09-14 13:52:30 -07:00
Lana Steuck
e4cc1a46cb Merge 2012-09-14 13:22:59 -07:00
Lana Steuck
2ee6f63c19 Merge 2012-09-14 10:15:05 -07:00
Zhengyu Gu
119c20297b 7198529: NPG: assert with NMT code in Thread destructor
Thread stack's base address can be NULL if it is not started or exited before recording the base

Reviewed-by: kvn, fparain
2012-09-14 12:55:50 -04:00
Jan Lahoda
f1487754e6 7192073: (javac) minor refactoring of tree maker to help IDEs
Reviewed-by: jjg
2012-09-14 09:21:55 -07:00
Vladislav Karnaukhov
ccf7724f51 6994562: Swing classes (both JTextArea and JTextField) don't support caret width tuning
Reviewed-by: rupashka, art
2012-09-14 19:51:14 +04:00
Alexander Scherbatiy
8b54dc6ea9 7196547: [macosx] Implement dead key detection for KeyEvent
Reviewed-by: skovatch, kizune
2012-09-14 15:30:46 +04:00
Alexander Scherbatiy
43349040a2 7197320: [macosx] Full Screen option missing when Window.documentModified
Reviewed-by: anthony
2012-09-14 15:08:54 +04:00
Jonathan Gibbons
ae09b79839 7177970: fix issues in langtools doc comments
Reviewed-by: mcimadamore
2012-09-13 14:29:36 -07:00
David Katleman
8a2b4598e4 Added tag jdk8-b56 for changeset 5b1ac23fe8a0 2012-09-13 13:16:45 -07:00
David Katleman
04d30a320f Added tag jdk8-b56 for changeset 9a3f2acd6f92 2012-09-13 13:16:04 -07:00
David Katleman
9c52f1e17a Added tag jdk8-b56 for changeset 35d8828b27fb 2012-09-13 13:15:39 -07:00
David Katleman
9500be57ff Added tag jdk8-b56 for changeset 5cc92e17f3ec 2012-09-13 13:15:34 -07:00
David Katleman
aeb1e1d09e Added tag jdk8-b56 for changeset 1bce16d0ddd1 2012-09-13 13:15:14 -07:00
David Katleman
0d408009f6 Added tag jdk8-b56 for changeset 1797aae1f07c 2012-09-13 13:14:58 -07:00
David Katleman
4fd78c5611 Added tag jdk8-b56 for changeset d8e903d6b2e0 2012-09-13 13:14:51 -07:00
Roland Westrelin
00c30b04f4 7198074: NPG: assert(((Metadata*)obj)->is_valid()) failed: obj is valid
Missing test for T_METADATA leads to incorrect register allocation.

Reviewed-by: kvn
2012-09-13 22:09:16 +02:00
Hal Mo
18582cee62 7197906: BlockOffsetArray::power_to_cards_back() needs to handle > 32 bit shifts
Reviewed-by: brutisso, johnc, ysr
2012-09-13 21:20:26 +02:00
Oleg Pekhovskiy
ffadb2c6a5 7198318: SunToolkitSubclass.java should be removed
Reviewed-by: serb
2012-09-13 21:23:23 +04:00
Oleg Pekhovskiy
08a51f1378 7186109: Simplify lock machinery for PostEventQueue & EventQueue
Reviewed-by: art, anthony, dholmes
2012-09-13 19:53:13 +04:00
David Katleman
895f5c3cd5 Merge 2012-09-12 15:57:26 -07:00
Sergey Bylokhov
589854449e 7124534: [macosx] Submenu title overlaps with Submenu indicator in JPopupMenu
Reviewed-by: art
2012-09-12 21:16:39 +04:00
Zhengyu Gu
a2f9b747a4 Merge 2012-09-11 20:12:55 -07:00
Zhengyu Gu
d8037e4c8d Merge 2012-09-11 18:28:51 -07:00
Zhengyu Gu
442e4b0e54 7181995: NMT ON: NMT assertion failure assert(cur_vm->is_uncommit_record() || cur_vm->is_deallocation_record
Fixed virtual memory records merge and promotion logic, should be based on sequence number vs. base address order

Reviewed-by: coleenp, acorn
2012-09-11 20:53:17 -04:00
Coleen Phillimore
6f1b52ab16 7196681: NPG: Some JSR 292 tests crash in Windows exception handler
There was a rogue os::breakpoint() call in log_dependency left over from the jsr292 merge.  Also changed verify_oop() calls for metadata to verify_{method,klass}_ptr.

Reviewed-by: kvn, twisti
2012-09-11 20:20:38 -04:00
Kelly O'Hair
408baee12e Merge 2012-09-11 14:18:54 -07:00
Kelly O'Hair
b4f55953e0 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
7180608: Sort the order of object files when building shared libraries

Reviewed-by: ohrstrom, erikj, tbell
2012-09-11 13:40:59 -07:00
Mike Duigou
bb1c4324e9 7189926: Reduce test size for default run. Add additional run enabling alternative hashing
Reviewed-by: alanb
2012-09-11 07:42:02 -07:00
Lana Steuck
ebe7692e1d Merge 2012-09-14 10:14:02 -07:00
Mandy Chung
c6064021fd 7193302: Remove ConstructorProperties annotation from java.lang.management.LockInfo
Reviewed-by: alanb, sla, egahlin
2012-09-14 09:47:14 -07:00
Sean Mullan
478bf4b32a Merge 2012-09-14 10:30:38 -04:00
Sean Mullan
9c6c879e23 Merge 2012-09-14 10:14:15 -04:00
Sean Mullan
5e99983092 7176627: CertPath/jep124/PreferCRL_SoftFail test fails (Could not determine revocation status)
Reviewed-by: xuelei
2012-09-14 10:13:04 -04:00
Alan Bateman
a9eb740a31 7197637: (ch) sun.nio.ch.Default* cause providers for other platforms to be included in rt.jar
Reviewed-by: mchung
2012-09-13 15:04:01 +01:00
Chris Hegarty
3505949495 7197203: sun/misc/URLClassPath/ClassnameCharTest.sh failed, compile error
Reviewed-by: alanb
2012-09-13 11:17:08 +01:00
Sean Mullan
fb2cf39b23 Merge 2012-09-12 15:21:46 -04:00
Jason Uh
b89fe033cb 7196593: java.security.debug=help doesn't list certpath option
Reviewed-by: mullan, wetmore, valeriep
2012-09-12 15:20:54 -04:00
Roland Westrelin
08757b8a99 7195816: NPG: Crash in c1_ValueType - ShouldNotReachHere
C1 needs knowledge of T_METADATA at the LIR level.

Reviewed-by: kvn, coleenp
2012-09-11 16:20:57 +02:00
Stefan Karlsson
b979c4ebe0 7197350: NPG: jvmtiHeapReferenceCallback receives incorrect reference_kind for system class roots
Fix the iteration over the system classes and report the correct reference kind.

Reviewed-by: coleenp, rbackman
2012-09-11 14:59:23 +02:00
Pavel Porvatov
41e85e364f 7195194: Better data validation for Swing
Reviewed-by: art, ahgross
2012-09-11 15:59:24 +04:00
Andrew Brygin
24043fa401 7181199: [macosx] Startup is much slower in headless mode for apps using Fonts
Reviewed-by: jgodinez, prr
2012-09-11 13:32:48 +04:00
Sergey Malenkov
e539ff810a 7195549: Better bean object persistence
Reviewed-by: art, ahgross
2012-09-11 12:57:09 +04:00
Sergey Malenkov
c14183f376 7193977: REGRESSION:Java 7's JavaBeans persistence ignoring the "transient" flag on properties
Reviewed-by: rupashka
2012-09-11 10:58:39 +04:00
Lana Steuck
35b39b9d65 Merge 2012-09-10 17:55:41 -07:00
Lana Steuck
143e0d9e1c Merge 2012-09-10 17:55:00 -07:00
Christian Thalinger
2ab9ff2658 7196242: vm/mlvm/indy/stress/java/loopsAndThreads crashed
Reviewed-by: jrose, coleenp, jmasa, kvn
2012-09-10 16:37:22 -07:00
Stuart Marks
7004635879 7195919: (sl) ServiceLoader can throw CCE without needing to create instance
Reviewed-by: ahgross, alanb, dmeetry
2012-09-10 16:05:53 -07:00
Jennifer Godinez
accba3a5e1 7183516: [macosx]Can't print-out the defined fonts for PrintFont_2D and AntialiasTableTest
Reviewed-by: bae, prr
2012-09-10 10:07:10 -07:00
Sean Mullan
6ac22bda1f Merge 2012-09-10 09:18:10 -04:00
Sean Mullan
2f5dfb27c2 Merge 2012-09-10 09:00:00 -04:00
Sean Mullan
21f5431109 7195301: XML Signature DOM implementation should not use instanceof to determine type of Node
Reviewed-by: xuelei
2012-09-10 08:57:51 -04:00
Bhavesh Patel
2c45db0933 Merge 2012-09-08 22:54:21 -07:00
Bhavesh Patel
fc3506df22 7180906: Javadoc tool does not apply parameter -nosince
Reviewed-by: jjg
2012-09-08 22:43:38 -07:00
Abhijit Saha
6b904d2507 Merge 2012-09-08 22:23:42 -07:00
Alan Bateman
c6f43f3599 7169884: LogManager checks do not work correctly for sub-types
Reviewed-by: mchung, ahgross
2012-09-08 20:31:42 +01:00
Abhijit Saha
38b305878c Merge 2012-09-07 18:18:55 -07:00
Coleen Phillimore
6fda647450 7196103: NPG: Unable to allocate bit map for parallel garbage collection for the requested heap size
Don't allocate huge class metaspace size by default on x64

Reviewed-by: stefank, jmasa, kvn
2012-09-07 16:42:25 -04:00
Sean Coffey
19e3f0756e 7180362: RFE: Implement date cutover functionality for currency.properties file
Reviewed-by: naoto
2012-09-07 21:22:37 +01:00
Jonathan Gibbons
b4b43de210 7196760: tree end positions incorrect after anno processing
Reviewed-by: mcimadamore
2012-09-07 11:35:53 -07:00
Jonathan Gibbons
f4749d4e50 7196774: javac cannot be built with JDK 6 after 7151010
Reviewed-by: mcimadamore
2012-09-07 11:24:00 -07:00
Jonathan Gibbons
0844683a0e 7186925: JavapTask passes null to java.io.Writer
Reviewed-by: jjh
2012-09-07 11:12:16 -07:00
Jason Uh
21cc7bf277 4647343: IDENT variable in sun.security.x509 classes not used
Reviewed-by: mullan
2012-09-07 12:49:04 -04:00
Coleen Phillimore
12b9a4edbb 7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
Simple renaming to be consistent with instanceKlass->InstanceKlass renaming

Reviewed-by: stefank, jmasa
2012-09-07 12:04:16 -04:00
John Zavgren
8fbd047f8c 6354758: rename old test HttpServer classes
Reviewed-by: chegar, michaelm, khazra
2012-09-07 15:30:17 +01:00
Eric Wang
de965a866a 7032247: java/net/InetAddress/GetLocalHostWithSM.java fails if hostname resolves to loopback address
TESTBUG

Reviewed-by: chegar, alanb
2012-09-07 14:00:31 +01:00
Alexander Scherbatiy
966d2c0cd4 7194469: Pressing the Enter key results in an alert tone beep when focus is TextField
Reviewed-by: bagiras, denis
2012-09-07 13:08:59 +04:00
Weijun Wang
7e677a587b 7196677: diff compares same file to itself in PaddingTest regression test
Reviewed-by: xuelei
2012-09-07 10:24:22 +08:00
David Katleman
7eb98442e1 Added tag jdk8-b55 for changeset bc332057d97a 2012-09-06 17:28:10 -07:00
David Katleman
1e5b3e3ded Added tag jdk8-b55 for changeset 4efc4ab93edd 2012-09-06 17:27:56 -07:00
David Katleman
79f7de8d0f Added tag jdk8-b55 for changeset 39d1771dd21b 2012-09-06 17:27:48 -07:00
David Katleman
76b8a9a6b7 Added tag jdk8-b55 for changeset b5d27d05eea2 2012-09-06 17:27:44 -07:00
David Katleman
2aa10d79aa Added tag jdk8-b55 for changeset 49f23700884c 2012-09-06 17:27:33 -07:00
David Katleman
ef3763175d Added tag jdk8-b55 for changeset a180f4cc7c94 2012-09-06 17:27:24 -07:00
David Katleman
5802f97caf Added tag jdk8-b55 for changeset b4f6c05ae88a 2012-09-06 17:27:20 -07:00
Lance Andersen
1e258cff36 7192302: Remove JDBCRowSetImpl dependency on java.beans
Reviewed-by: alanb, mchung
2012-09-06 13:16:19 -04:00
Jon Masamitsu
cd5df1082a 7196298: Better fix for 7195789
Reviewed-by: jcoomes, brutisso
2012-09-06 07:28:30 -07:00
Oleg Pekhovskiy
9c35d5e4d1 7153339: InternalError when drawLine with Xor and Antialiasing
Reviewed-by: prr, flar
2012-09-06 17:57:31 +04:00
Mikael Gerdin
cfefd5fc47 7195557: NPG: Unexpected number of memory pools
Update management tests to work with a VM without a permanent generation memory pool

Reviewed-by: rbackman, brutisso, sla, dholmes
2012-09-06 14:07:12 +02:00
Alexander Zuev
a483db078d 7175183: [macosx] Objective-C exception thrown when switching monitor configuration
Reviewed-by: prr, serb
2012-09-06 14:59:54 +04:00
Lana Steuck
a1878f7d14 Merge 2012-09-05 20:03:19 -07:00
Lana Steuck
29f70d33d7 Merge 2012-09-05 20:01:40 -07:00
Lana Steuck
2216719923 Merge 2012-09-05 17:33:52 -07:00
Coleen Phillimore
8536f548db 7195867: NPG: SAJDI tests fail with sun.jvm.hotspot.types.WrongTypeException: No suitable match for type
Need to restore the vtable in metadata when we restore the type from the shared archive.

Reviewed-by: acorn, jcoomes, jmasa, jrose
2012-09-05 20:08:08 -04:00
Lana Steuck
51b47903db Merge 2012-09-05 13:50:00 -07:00
John Coomes
6ecb1dc545 Merge 2012-09-05 12:58:45 -07:00
John Coomes
1fc1536a31 7196361: add hotspot/make/closed to hgforest.sh
Reviewed-by: ohair
2012-09-05 12:42:26 -07:00
Lana Steuck
147f804a82 Merge 2012-09-05 12:00:30 -07:00
Kumar Srinivasan
e9b83f5d6f 7194005: (launcher) needs to be enhanced for 64-bit jar file handling
Reviewed-by: darcy, sherman
2012-09-05 11:38:40 -07:00
Lana Steuck
9014f4ced0 Merge 2012-09-05 11:59:27 -07:00
Sergey Bylokhov
7788603b2e 7124523: [macosx] b216: Mising part of applet UI
Reviewed-by: denis, alexsch
2012-09-05 21:40:05 +04:00
Valerie Peng
c53bbad396 Merge 2012-09-05 10:26:54 -07:00
Vladimir Kozlov
f3b6368c39 7196167: NPG: mismerge in make/solaris/makefiles/fastdebug.make
Remove the workaround of 7187454 problem which was restored incorrectly during NPG merge.

Reviewed-by: coleenp, dholmes
2012-09-05 10:18:37 -07:00
Scott Kovatch
2663894371 7187834: [macosx] Usage of private API in macosx 2D implementation causes Apple Store rejection
Reviewed-by: prr, igor
2012-09-05 09:34:19 -07:00
Jim Holmlund
7dfe1cb86c 7185778: javah error "Not a valid class name" on class names with dollar signs
Reviewed-by: jjg
2012-09-05 08:32:32 -07:00
Staffan Larsen
330ba0e873 6963102: Testcase failures sun/tools/jstatd/jstatdExternalRegistry.sh and sun/tools/jstatd/jstatdDefaults.sh
Make tests more resilient by allowing for more error messages from jps

Reviewed-by: alanb, rbackman, dsamersoff
2012-09-05 14:42:44 +02:00
Stefan Karlsson
36d57e3669 7195935: NPG: Some issues with compressed oops
Don't decompress the klass pointer in the G1 pre-barrier code when !UseCompressedKlassPointers

Reviewed-by: coleenp, brutisso
2012-09-05 10:39:29 +02:00
Valerie Peng
a431f9851d 7044060: Need to support NSA Suite B Cryptography algorithms
Add support for DSA parameter generation and OIDs for NSA Suite B algorithms.

Reviewed-by: vinnie
2012-09-04 18:41:06 -07:00
Jon Masamitsu
6f32be5139 7195789: NPG: assert(used + free == capacity) failed: Accounting is wrong
Reviewed-by: coleenp, jcoomes
2012-09-04 16:20:28 -07:00
Christian Thalinger
0f2dd1c15e 7196120: NPG: JSR 2292 test fails because missing fix for 7188911
Reviewed-by: kvn, coleenp
2012-09-04 18:01:20 -07:00
Roland Westrelin
badaff577b 7184649: NPG: Implement another MetdataPtr case
Xmeet when both inputs are MetadataPtr.

Reviewed-by: kvn
2012-09-04 23:27:55 +02:00
Jonathan Gibbons
52ca21c92a 7195519: OutOfMemoryError in docs build after 7151010
Reviewed-by: darcy
2012-09-04 12:53:50 -07:00
Sergey Malenkov
2276a38632 7195106: REGRESSION : There is no way to get Icon inf, once Softreference is released
Reviewed-by: rupashka
2012-09-04 20:50:44 +04:00
Stefan Karlsson
3610a76e25 7195968: NPG: oopDesc::list_ptr_from_klass is broken
Remove incorrect cast

Reviewed-by: brutisso, coleenp
2012-09-04 13:01:03 +02:00
Eric Wang
e0782017fe 7195733: TEST_BUG: sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java failing
Reviewed-by: chegar, alanb, xuelei
2012-09-04 02:24:51 -07:00
Sergey Malenkov
25c0370a8b 7169395: Exception throws due to the changes in JDK 7 object tranversal and break backward compatibility
Reviewed-by: art
2012-09-04 13:12:16 +04:00
Coleen Phillimore
eff152a7be 7195823: NPG: CMS reserved() doesn't match _rs.base()
If the commit fails, the size isn't set so the assert fails.

Reviewed-by: kamg
2012-09-03 18:37:12 -04:00
Jon Masamitsu
5c58d27aac 6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes

Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
John Coomes
36eee7c8c8 7195615: new hotspot build - hs25-b01
Reviewed-by: johnc
2012-08-31 16:39:35 -07:00
John Coomes
58d9fd45ac Merge 2012-08-31 16:39:04 -07:00
John Coomes
ae110cd170 Added tag hs24-b22 for changeset a83f6d24c373 2012-08-31 16:17:41 -07:00
John Coomes
c6516ccaea Merge 2012-08-31 16:17:40 -07:00
Christian Thalinger
6948846044 Merge 2012-08-31 15:20:25 -07:00
Dan Xu
b6bee3c9e9 7193406: Clean-up JDK Build Warnings in java.util, java.io
Clean-up JDK Build Warnings in java.util, java.io Packages

Reviewed-by: smarks, darcy, khazra, dholmes, forax, dl, andrew, aph, omajid, ulfzibis, christos, mduigou
2012-08-31 13:42:47 -07:00
Dmytro Sheyko
366a5c5175 7194597: Typeo in com.sun.management.VMOption.toString()
VMOption.toString() returns "...(read-only)" if writable "...(read-write)" otherwise.

Reviewed-by: alanb, mchung
2012-09-11 19:58:36 +04:00
Jiangli Zhou
c3b3276936 Merge 2012-08-31 12:59:10 -07:00
Lana Steuck
6fc24809d4 Merge 2012-08-31 12:11:03 -07:00
Jiangli Zhou
50b6647678 Merge 2012-08-31 14:47:01 -04:00
Christian Thalinger
6ddab0cf3c Merge 2012-08-31 10:48:08 -07:00
Sergey Malenkov
5aa6dd0031 7194567: Improve long term persistence of java.beans objects
Reviewed-by: ahgross, art
2012-08-31 09:15:34 -07:00
Anton Tarasov
67b1f9248b 6981400: Tabbing between textfield do not work properly when ALT+TAB
7157015: [macosx] Situation when KeyEventDispatcher doesn't work on AWT but does on Swing
7121442: Regression : Reopen CR 6458497 still reproducible using JDK 7

Reviewed-by: art, leonidr
2012-08-31 16:31:29 +04:00
Sergey Malenkov
7d367a5123 7186794: Setter not found. PropertyDescriptor(PropertyDescriptor,PropertyDescriptor)
Reviewed-by: rupashka
2012-08-31 14:49:23 +04:00
Sergey Malenkov
99bfc33cce 7192955: Introspector overide PropertyDescriptor for generic type field defined in super class
Reviewed-by: rupashka
2012-08-31 14:32:09 +04:00
Joel Borggrén-Franck
9c23b8bad0 7151010: Add compiler support for repeating annotations
Reviewed-by: jjg, mcimadamore
2012-08-31 10:37:46 +01:00
Bengt Rutisson
911d3e3ac6 Merge 2012-08-31 08:30:30 +02:00
Lana Steuck
047abf380a Merge 2012-08-30 20:16:07 -07:00
Lana Steuck
659c51746c Merge 2012-08-30 20:14:48 -07:00
Lana Steuck
99c7a955ec Merge 2012-08-30 20:13:30 -07:00
Lana Steuck
955d253fed Merge 2012-08-30 20:10:34 -07:00
Lana Steuck
b796471371 Merge 2012-08-30 20:10:29 -07:00
David Katleman
53024605e4 Added tag jdk8-b54 for changeset edce301a53ed 2012-08-30 10:27:39 -07:00
David Katleman
18c8f75901 Added tag jdk8-b54 for changeset 9b806d4f69be 2012-08-30 10:27:23 -07:00
David Katleman
1ee5aecfeb Added tag jdk8-b54 for changeset e0b1a72b7a91 2012-08-30 10:27:18 -07:00
David Katleman
6b75da0827 Added tag jdk8-b54 for changeset 3799d28d324f 2012-08-30 10:27:15 -07:00
David Katleman
f6008840a0 Added tag jdk8-b54 for changeset 0b41a071152f 2012-08-30 10:27:07 -07:00
David Katleman
0c6def85cc Added tag jdk8-b54 for changeset bbaf12c708dc 2012-08-30 10:27:01 -07:00
David Katleman
1bd0a0be7d Added tag jdk8-b54 for changeset c5705c72aff8 2012-08-30 10:26:55 -07:00
Bill Pittore
58a50b25eb 7154641: Servicability agent should work on platforms other than x86, sparc
Added capability to load support classes for other cpus

Reviewed-by: coleenp, bobv, sla
2012-08-30 11:20:01 -04:00
David Katleman
c4c4e329f2 Merge 2012-08-29 15:28:39 -07:00
Denis Fokin
ac4a9defca 7192887: java/awt/Window/Grab/GrabTest.java still failed (fix failed for CR 7149068)
Reviewed-by: ant, serb
2012-08-30 01:17:24 +04:00
Brandon Mitchell
f51faf2bbe 7194409: os::javaTimeNanos() shows hot on CPU_CLK_UNHALTED profiles
Add inline directives to os::Linux::supports_monotonic_clock() and os::Bsd::supports_monotonic_clock().

Reviewed-by: johnc, azeemj, mikael
2012-08-29 13:02:54 -07:00
Vladimir Kozlov
da65cc4532 7160161: Missed safepoint in non-Counted loop
Do not remove safepoints during peeling optimization.

Reviewed-by: twisti
2012-08-29 13:02:40 -07:00
Pavel Punegov
373b8ccd27 7191926: Remove MKS dependency in Hotspot regression tests
Add case for CYGWIN in .sh files.

Reviewed-by: coleenp, kvn
2012-08-29 14:49:05 -04:00
Leonid Romanov
18e3872928 7124375: [macosx] Focus isn't transfered as expected between components
Reviewed-by: art, ant, serb
2012-08-29 19:53:35 +04:00
Chris Hegarty
84603e4d94 7189567: java net obselete protocol
Reviewed-by: alanb, ahgross
2012-08-29 14:05:37 +01:00
Alexander Scherbatiy
31ec802d7e 7171045: [macosx] There are no enter or exit events reported against 8b39 for MouseEventsDuringDrag
Reviewed-by: anthony, serb
2012-08-29 15:54:28 +04:00
Christian Thalinger
40c1bd4242 7192406: JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
Reviewed-by: kvn
2012-08-28 15:24:39 -07:00
John Cuthbertson
eb2c52c717 7041879: G1: introduce stress testing parameter to cause frequent evacuation failures
Add the flags G1EvacuationFailureALot flag (and supporting flags) to force trigger evacuation failures. The support flags control how often to trigger an evacuation failure and during which types of evacuation pause. This functionality is analogous to that of PromotionFailureALot for the other collectors.

Reviewed-by: brutisso
2012-08-28 15:20:08 -07:00
Christian Thalinger
e48b871bdc 7194662: JSR 292: PermuteArgsTest times out in nightly test runs
Reviewed-by: kvn
2012-08-28 14:57:43 -07:00
John R Rose
03930364c8 7194612: api/java_lang/invoke/MethodHandles/Lookup/index.html#ExceptionsTests[findVirtualNSME] fails w/ -esa
Reviewed-by: kvn, twisti
2012-08-28 13:14:59 -07:00
Lana Steuck
a0b3f023db Merge 2012-08-28 12:24:33 -07:00
Lana Steuck
a43f699f88 Merge 2012-08-28 12:20:26 -07:00
Daniel D. Daugherty
7f75e401cc 7194608: add VerifyLocalVariableTableOnRetransformTest.sh to Problem.list
Reviewed-by: alanb
2012-08-28 09:40:27 -07:00
Rickard Bäckman
228b4f6d7f 7093328: JVMTI: jvmtiPrimitiveFieldCallback always report 0's for static primitives
Reviewed-by: dholmes, dcubed
2012-08-28 15:15:29 +02:00
Coleen Phillimore
5f4a2405a7 Merge 2012-10-15 22:33:19 -04:00
Kevin Walls
b296b69382 7195151: Multiplatform tescase for 6929067
Reviewed-by: kamg, kvn
2012-10-15 16:48:48 +01:00
Keith McGuigan
04a9a14193 7054345: Support version 52.0 class file in HotSpot
Accept classfiles with major version 52

Reviewed-by: coleenp, acorn
2012-10-11 14:27:54 -04:00
Harold Seigel
6b158b4089 7199068: NPG: SharedSkipVerify is meaningless
Remove the SharedSkipVerify flag

Reviewed-by: kamg, sspitsyn, coleenp
2012-10-10 17:04:33 -04:00
Sean Mullan
d335016419 Merge 2012-08-28 08:46:23 -04:00
Sean Mullan
d981574a8a 7192896: Reason of CertPathValidatorException should be UNDETERMINED_REVOCATION_STATUS if OCSP request failed
Reviewed-by: xuelei
2012-08-28 08:43:17 -04:00
Sergey Bylokhov
0107379c53 7186371: [macosx] Main menu shortcuts not displayed (7u6 regression)
Reviewed-by: leonidr
2012-08-28 16:04:27 +04:00
Eric Wang
25c7724d6e 6962637: TEST_BUG: java/io/File/MaxPathLength.java may fail in busy system
Reviewed-by: dholmes, alanb
2012-08-28 11:12:46 +01:00
Jonathan Gibbons
3edec130c3 7194035: update tests for upcoming changes for jtreg
Reviewed-by: alanb, sspitsyn
2012-08-28 10:31:27 +01:00
Jonathan Gibbons
e4326b6cc5 7194032: update tests for upcoming changes for jtreg
Reviewed-by: alanb, iris
2012-08-28 10:29:30 +01:00
Weijun Wang
f7c2d784ae 7194472: FileKeyTab.java test fails on Windows
Reviewed-by: alanb
2012-08-28 17:25:07 +08:00
Tao Mao
447e7065d2 6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp
Reviewed-by: kvn, dholmes, coleenp
2012-08-27 15:17:17 -07:00
Lana Steuck
1dc8f7d026 Merge 2012-08-27 11:48:09 -07:00
Lana Steuck
09930417d3 Merge 2012-08-27 11:28:08 -07:00
Lana Steuck
de50ec6f3f Merge 2012-08-27 10:59:13 -07:00
Lana Steuck
47b747e08c Merge 2012-08-27 10:58:40 -07:00
Lana Steuck
b78fd98dc7 Merge 2012-08-27 10:55:57 -07:00
Lana Steuck
52dccdcb9e Merge 2012-08-27 10:54:30 -07:00
Vladimir Kozlov
f0d08c04f1 7148109: C2 compiler consumes too much heap resources
Add split_arena to allocate temporary arrays in PhaseChaitin::Split() and free them on method's exit.

Reviewed-by: twisti
2012-08-27 09:46:38 -07:00
Jan Lahoda
398a74ffa0 7192068: (javac) provide a way for IDEs to produce Enclosing Method attributes
Reviewed-by: jjg
2012-08-27 07:21:46 -07:00
Weijun Wang
66f06a99dc 7152121: Krb5LoginModule no longer handles keyTabNames with "file:" prefix
Reviewed-by: mullan
2012-08-27 10:23:43 +08:00
Mandy Chung
9108824515 7193339: Prepare system classes be defined by a non-null module loader
Reviewed-by: alanb, dholmes, dsamersoff, sspitsyn, psandoz
2012-08-24 22:55:49 -07:00
Daniel D. Daugherty
2ec592f290 Merge 2012-08-24 19:45:42 -07:00
Alejandro Murillo
2271c9dfad 7194004: new hotspot build - hs24-b22
Reviewed-by: jcoomes
2012-08-24 16:23:59 -07:00
Alejandro Murillo
da2de44d1a Added tag hs24-b21 for changeset 2ab6bbc9883c 2012-08-24 15:51:20 -07:00
Alejandro Murillo
08e886940b Merge 2012-08-24 15:51:19 -07:00
Christian Thalinger
80ceb641ad Merge 2012-08-24 15:41:39 -07:00
Kurchi Subhra Hazra
54f3f7f7ed 7168172: (fs) Files.isReadable slow on Windows
Remove DACL checking for read access, also reviewed by Ulf.Zibis@CoSoCo.de, zhong.j.yu@gmail.com

Reviewed-by: alanb
2012-08-24 11:48:51 -07:00
Christian Thalinger
2509329d59 Merge 2012-08-24 11:48:32 -07:00
Alan Bateman
ccd9f0ffaa 7193933: More ProblemList.txt updates (8/2012)
Reviewed-by: darcy, chegar
2012-08-24 19:35:30 +01:00
Naoto Sato
2d1e211a10 7193601: Build breakage with the fix to 6336885 (build-infra build)
Reviewed-by: mduigou
2012-08-24 10:13:58 -07:00
Anthony Petrov
ed711d4ca7 7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
Constrain window dimensions with screen bounds and GL_MAX_TEXTURE_SIZE

Reviewed-by: art, serb
2012-08-24 14:58:04 +04:00
Bengt Rutisson
74cef1447a Merge 2012-08-24 09:45:08 +02:00
Sean Chou
a1e20b1d0a 7193169: The code example in javadoc of Component.java misses 'implements' keyword
Reviewed-by: anthony
2012-08-24 11:35:51 +08:00
David Katleman
25fe6a4c37 Added tag jdk8-b53 for changeset f7a4c716de5d 2012-08-23 12:27:59 -07:00
David Katleman
428409a29b Added tag jdk8-b53 for changeset 08dbb62358cb 2012-08-23 12:27:49 -07:00
David Katleman
5099c5a4d0 Added tag jdk8-b53 for changeset c45e8803a82b 2012-08-23 12:27:44 -07:00
David Katleman
badee55a59 Added tag jdk8-b53 for changeset e18b2f956052 2012-08-23 12:27:41 -07:00
David Katleman
17a596280e Added tag jdk8-b53 for changeset 441121a0bcde 2012-08-23 12:27:33 -07:00
David Katleman
489be4fd9b Added tag jdk8-b53 for changeset 7953230add35 2012-08-23 12:27:28 -07:00
David Katleman
abfcb95722 Added tag jdk8-b53 for changeset ead6122c3c52 2012-08-23 12:27:22 -07:00
Vladimir Kozlov
fbcc3da64f 7192965: assert(is_aligned_sets(size)) failed: mask is not aligned, adjacent sets
Change pair check to vector check in RA bias coloring code.

Reviewed-by: jrose, twisti
2012-08-23 09:13:16 -07:00
Andrew John Hughes
7e51cd125d 7192804: Build should not install jvisualvm man page for OpenJDK
OpenJDK builds don't ship VisualVM so shouldn't ship its man page either.

Reviewed-by: dholmes
2012-08-23 15:42:23 +01:00
Jason T Greene
3800b44b13 7191587: (se) SelectionKey.interestOps does not defer changing the interest set to the next select [macosx]
Reviewed-by: alanb
2012-08-23 13:07:08 +01:00
Frank Ding
cd118009c8 7193463: Improve registering signal handlers in java.lang.Terminator.setup()
Reviewed-by: dholmes, alanb
2012-08-23 16:28:17 +08:00
Bengt Rutisson
68bbfe24e7 7178363: G1: Remove the serial code for PrintGCDetails and make it a special case of the parallel code
Also reviewed by vitalyd@gmail.com. Introduced the WorkerDataArray class. Fixed some minor logging bugs.

Reviewed-by: johnc, mgerdin
2012-08-23 10:21:12 +02:00
Bengt Rutisson
6dbe18d702 7193157: G1: Make some develpflags available in product builds
Also reviewed by: vitalyd@gmail.com. Make G1DefaultMinNewGenPercent, G1DefaultMaxNewGenPercent, G1OldCSetRegionLiveThresholdPercent and G1OldCSetRegionThresholdPercent experimental flags

Reviewed-by: ysr, johnc, jmasa
2012-08-23 05:25:59 +02:00
Vladimir Kozlov
cbfca3259c 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
Fixed Pack node generation. Not vectorize shift instructions if count is not the same for all shifts and if count is vector.

Reviewed-by: twisti
2012-08-22 11:55:40 -07:00
Roland Westrelin
405f5a75cd 7171824: assert(_offset >= 1) failed: illegal call to offset()
C1 value numbering hits unloaded klass.

Reviewed-by: kvn, twisti
2012-08-22 14:29:57 +02:00
Staffan Larsen
6d8fa095b3 7192916: Hotspot development launcher should use DYLD_LIBRARY_PATH on OS X
Reviewed-by: dholmes, dsamersoff, nloodin
2012-08-22 10:01:51 +02:00
Daniel D. Daugherty
5a47de8e75 Merge 2012-08-21 19:25:20 -07:00
Vladimir Kozlov
ef4102148a 7192964: assert(false) failed: bad AD file
Shifts with loop variant counts "a[i]=1<<b[i];" should not be vectorized since hw does not support it.

Reviewed-by: twisti
2012-08-21 14:50:02 -07:00
John Cuthbertson
61493cd92e 7185699: G1: Prediction model discrepancies
Correct the result value of G1CollectedHeap::pending_card_num(). Change the code that calculates the GC efficiency of a non-young heap region to use historical data from mixed GCs and the actual number of live bytes when predicting how long it would take to collect the region. Changes were also reviewed by Thomas Schatzl.

Reviewed-by: azeemj, brutisso
2012-08-21 14:10:39 -07:00
Naoto Sato
73ff23b7f7 6336885: RFE: Locale Data Deployment Enhancements
4609153: Provide locale data for Indic locales
5104387: Support for gl_ES locale (galician language)
6337471: desktop/system locale preferences support
7056139: (cal) SPI support for locale-dependent Calendar parameters
7058206: Provide CalendarData SPI for week params and display field value names
7073852: Support multiple scripts for digits and decimal symbols per locale
7079560: [Fmt-Da] Context dependent month names support in SimpleDateFormat
7171324: getAvailableLocales() of locale sensitive services should return the actual availability of locales
7151414: (cal) Support calendar type identification
7168528: LocaleServiceProvider needs to be aware of Locale extensions
7171372: (cal) locale's default Calendar should be created if unknown calendar is specified

JEP 127: Improve Locale Data Packaging and Adopt Unicode CLDR Data (part 1 w/o packaging changes. by Naoto Sato and Masayoshi Okutsu)

Reviewed-by: erikj, sherman, peytoia
2012-08-21 11:00:30 -07:00
Christian Thalinger
a14e902e92 7192167: JSR 292: C1 has old broken code which needs to be removed
Reviewed-by: kvn, roland, jrose
2012-08-21 10:48:50 -07:00
John Cuthbertson
384650cb3e 7192128: G1: Extend fix for 6948537 to G1's BOT
G1 does not appear to be immune to the issue described in CR 6948537 and increasing the size of old-generation PLABs appears to increase the liklihood of seeing the issue. Extend the fix for 6948537 to G1's BlockOffsetTable.

Reviewed-by: brutisso, jmasa
2012-08-21 10:05:57 -07:00
Shirish Kuncolienkar
ae25fd53b6 7132889: (se) AbstractSelectableChannel.register and configureBlocking not safe from asynchronous close
Reviewed-by: alanb
2012-08-21 13:42:08 +01:00
Pavel Porvatov
9ef68c62d1 6866747: J2SE_Swing_Reg:can not see any HSB tab
Reviewed-by: alexsch
2012-08-21 14:37:16 +04:00
Jonathan Gibbons
504f41de5d 7192744: fix up tests to accommodate jtreg spec change
Reviewed-by: darcy
2012-08-20 13:50:04 -07:00
Vladimir Kozlov
04c6a7ce10 7190310: Inlining WeakReference.get(), and hoisting $referent may lead to non-terminating loops
In C2 add software membar after load from Reference.referent field to prevent commoning of loads across safepoint since GC can change its value. In C1 always generate Reference.get() intrinsic.

Reviewed-by: roland, twisti, dholmes, johnc
2012-08-20 09:58:58 -07:00
Vladimir Kozlov
e3c3c8527e 6340864: Implement vectorization optimizations in hotspot-server
Added asm encoding and mach nodes for vector arithmetic instructions on x86.

Reviewed-by: roland
2012-08-20 09:07:21 -07:00
Athijegannathan Sundararajan
6214b5d906 7181320: javac NullPointerException for switch labels with cast to String expressions
Reviewed-by: mcimadamore
2012-08-20 21:24:10 +05:30
Rob McKenna
e81dadf112 7191777: test/java/lang/ProcessBuilder/Basic.java failing intermittently due to additions for 4244896
Reviewed-by: dholmes, alanb
2012-08-20 14:52:12 +01:00
Sergey Malenkov
b884fcc43d 7189112: java.beans.Introspector misses write methods
Reviewed-by: rupashka
2012-08-20 13:38:30 +04:00
Frank Ding
65713fce9a 7188612: JTable's AccessibleJTable throws IllegalComponentStateException instead of null
Reviewed-by: rupashka
2012-08-20 13:16:18 +08:00
Weijun Wang
d35a91d60d 7192202: Make sure keytool prints both unknown and unparseable extensions
Reviewed-by: mullan
2012-08-20 07:59:26 +08:00
Alan Bateman
edd2d4ce86 7191467: (fs) WatchService periodically fails to queue ENTRY_DELETE event for short lived file [sol11]
Reviewed-by: chegar
2012-08-19 13:29:01 +01:00
Alan Bateman
280b56b270 7192275: Minimize LogManager dependencies on java.beans
Reduce dependency to PropertyChangeListener and PropertyChangeEvent. Also add basic test coverage.

Reviewed-by: dcubed, dsamersoff, mchung
2012-08-19 13:03:00 +01:00
Jonathan Gibbons
c1ee469435 7192449: fix up tests to accommodate jtreg spec change
Reviewed-by: darcy
2012-08-17 17:30:03 -07:00
Alejandro Murillo
913294e5db Merge 2012-08-17 16:47:04 -07:00
Alejandro Murillo
b11a680280 Merge 2012-08-17 15:41:04 -07:00
John R Rose
9d9d7877aa 7191102: nightly failures after JSR 292 lazy method handle update (round 3)
Reviewed-by: twisti, kvn
2012-08-17 13:42:25 -07:00
Daniel D. Daugherty
9d85b8e187 Merge 2012-08-17 11:57:46 -07:00
Joe Wang
5d2e65169c 7191547: XMLEventFactory.newFactory(String factoryId, ClassLoader loader) does not work as expected
Similar to the patch for 6756677 for XMLInputFactory and XMLOutputFactory, this patch fixes an error in XMLEventFactory where factoryId was taken as factory class.

Reviewed-by: lancea
2012-08-17 09:49:42 -07:00
Kumar Srinivasan
d07131ac67 7190750: (pack200) the java unpacker produces non spec. compliant classfile with lambda classfiles
Reviewed-by: jrose
2012-08-17 08:28:48 -07:00
Daniel D. Daugherty
3be453e452 7191322: add test for 7064927 to java.lang.instrument
Add support for canRetransform attribute to the test manager. Add test for 7064927.

Reviewed-by: dsamersoff, sspitsyn, ohair
2012-08-17 12:51:23 -07:00
Jason Uh
630647752a 6500133: REGRESSION: CertificateParsingException for CRL Distribution Point with blank
Reviewed-by: mullan
2012-08-17 14:32:50 -04:00
Pavel Porvatov
5aa8e80d0b 7190597: Nimbus: regtest for 4235420 fails
Reviewed-by: alexsch
2012-08-17 17:04:59 +04:00
Frank Ding
6a7bd4b00c 7191275: Cleanup OS specific blocks in PlainDatagramSocketImpl.c to support more unix-like platforms
Reviewed-by: chegar
2012-08-17 17:10:56 +08:00
Andrew Brygin
3504e5bcfa 7150594: VM chash in JCK api/java_awt/Image/ConvolveOp/ tests for 64 bit jdk8 on linux
Reviewed-by: jgodinez, prr
2012-08-17 11:22:57 +04:00
David Katleman
982db35447 Added tag jdk8-b52 for changeset 2d183808d5fd 2012-08-16 11:43:32 -07:00
David Katleman
9f4a2d95ee Added tag jdk8-b52 for changeset 81d8f7cbdcbc 2012-08-16 11:43:24 -07:00
David Katleman
8450303190 Added tag jdk8-b52 for changeset 0408deebe989 2012-08-16 11:43:20 -07:00
David Katleman
664534610e Added tag jdk8-b52 for changeset 249b4f59d330 2012-08-16 11:43:18 -07:00
David Katleman
22d6b39dc8 Added tag jdk8-b52 for changeset c2e1881d85fa 2012-08-16 11:43:12 -07:00
David Katleman
1c60d4521b Added tag jdk8-b52 for changeset 3a6dd182033b 2012-08-16 11:43:09 -07:00
David Katleman
2885a2198f Added tag jdk8-b52 for changeset 0e6fd20fd7a4 2012-08-16 11:43:06 -07:00
Chris Hegarty
9f27d2af4c 7189103: Executors needs to maintain state
Reviewed-by: dholmes, hawtin
2012-08-16 15:02:34 +01:00
Eric Wang
6b186c1238 7132247: java/rmi/registry/readTest/readTest.sh failing with Cygwin
Reviewed-by: alanb
2012-08-16 14:35:26 +01:00
Amy Lu
16c1be5ff6 7191892: ProblemList.txt updates (8/2012)
Reviewed-by: alanb
2012-08-16 11:42:47 +01:00
Alan Bateman
3261af24cf 7191556: (fs) UnixNativeDispatcher.getextmntent should be moved into platform specific code
Reviewed-by: andrew
2012-08-16 11:14:42 +01:00
Sean Coffey
9573fdd192 7185965: Build error in javadoc make stage for bundles not containing crypto package
Reviewed-by: chegar
2012-08-16 10:48:43 +01:00
David MacDonald
b9fda6fcd8 7056731: Race condition in CORBA code causes re-use of ABORTed connections
Reviewed-by: lancea
2012-08-16 10:35:35 +01:00
David MacDonald
6490b69f57 7056731: Race condition in CORBA code causes re-use of ABORTed connections
Reviewed-by: lancea
2012-08-16 10:33:01 +01:00
David Katleman
ff827332a8 Merge 2012-08-15 18:04:14 -07:00
Alejandro Murillo
e284fe5f5a 7191765: make jdk8 the default jprt release for hs24
Reviewed-by: jcoomes
2012-08-15 16:49:38 -07:00
Rob McKenna
e892fb5b1d 6931128: (spec) File attribute tests fail when run as root
Reviewed-by: alanb
2012-08-15 22:46:35 +01:00
Steve Sides
12a8d12863 7191449: update copyright year to match last edit in jdk8 langtools repository
Reviewed-by: jjh
2012-08-15 13:48:46 -07:00
Sean Mullan
e5fbf01489 7189490: More improvements to DomainCombiner checking
Reviewed-by: ahgross, jdn, vinnie
2012-08-15 15:31:30 -04:00
Andrew John Hughes
1ec7522737 7110151: Use underlying platform's zlib library for Java zlib support
Make SYSTEM_ZLIB more flexible by using ZLIB_{CFLAGS,LIBS} and building on more than just MACOSX.

Reviewed-by: sherman, alanb
2012-08-15 14:35:36 +01:00
Sergey Bylokhov
6db39dc542 7172187: [macosx] JAWT native CALayer not positioned over Canvas
Reviewed-by: art, anthony
2012-08-15 15:02:34 +04:00
Pavel Porvatov
741d368217 7190543: Nimbus LaF: regression: JSplitPane is not opaque -- or should it?
Reviewed-by: alexsch
2012-08-15 14:33:44 +04:00
Omair Majid
ce9faa4692 7190813: (launcher) RPATH needs to have additional paths
Reviewed-by: anthony, ksrini
2012-08-14 17:11:11 -04:00
Zhengyu Gu
5bc134a53b 7191124: Optimized build is broken due to inconsistent use of DEBUG_ONLY and NOT_PRODUCT macros in NMT
Updated all related variables and methods to use NOT_PRODUCT macros

Reviewed-by: coleenp, acorn, kvn
2012-08-14 13:56:46 -04:00
Michael Fang
cce753813e Merge 2012-08-13 16:26:19 -07:00
Alexander Zuev
d78db85100 7177144: [macosx] Drag and drop not working (regression in 7u6)
Reviewed-by: art, serb
2012-08-13 19:49:04 +04:00
Alexander Zuev
4c53f0adc3 Merge 2012-08-13 19:19:34 +04:00
Leonid Romanov
402fcded14 7159381: [macosx] Dock Icon defaults to Generic Java Application Category
Reviewed-by: anthony
2012-08-13 17:53:56 +04:00
Marco Dinacci
4bd6fb3f68 7161437: [macosx] awt.FileDialog doesn't respond appropriately for mac when selecting folders
Reviewed-by: art, anthony
2012-08-13 17:43:37 +04:00
Deven You
48e5b771c7 7189611: Venezuela current Currency should be Bs.F
Reviewed-by: okutsu
2012-08-13 10:45:43 +08:00
Alejandro Murillo
4e28ce96d0 7190772: new hotspot build - hs24-b21
Reviewed-by: jcoomes
2012-08-10 23:19:43 -07:00
Tim Bell
c99e9bbc0f 7190512: Fix for 7181175 broke hotspot/make/windows/create.bat builds
Add some quotes around the classpath in the project file rule.

Reviewed-by: dcubed
2012-08-10 23:16:52 -07:00
Alejandro Murillo
de7d70ee06 Added tag hs24-b20 for changeset 25eb3939c390 2012-08-10 23:07:38 -07:00
Christian Thalinger
74e492d286 Merge 2012-08-10 17:50:24 -07:00
Christian Thalinger
eadc52ac6e Merge 2012-08-10 16:03:28 -07:00
Christian Thalinger
c9fb0d52ee Merge 2012-08-10 15:50:49 -07:00
Abhijit Saha
04865aa88a Merge 2012-08-10 10:41:13 -07:00
Lana Steuck
dd32d97101 Merge 2012-08-10 10:15:52 -07:00
Lana Steuck
20bfd9b2da Merge 2012-08-10 10:14:48 -07:00
David Katleman
79c6a61454 Added tag jdk8-b51 for changeset 716ed0cb0cea 2012-08-09 18:02:43 -07:00
David Katleman
ff0c285578 Added tag jdk8-b51 for changeset 1325e8a540e5 2012-08-09 18:02:01 -07:00
David Katleman
2db20e0e30 Added tag jdk8-b51 for changeset d63c06178ebc 2012-08-09 18:01:45 -07:00
David Katleman
fd4e1e725f Added tag jdk8-b51 for changeset f333428be769 2012-08-09 18:01:36 -07:00
David Katleman
923215d482 Added tag jdk8-b51 for changeset 90fa336b0a49 2012-08-09 18:00:58 -07:00
David Katleman
defa61a4fc Added tag jdk8-b51 for changeset 0efd681d5f54 2012-08-09 18:00:30 -07:00
David Katleman
65699480fc Added tag jdk8-b51 for changeset 3cb655c7a1f2 2012-08-09 18:00:28 -07:00
Christian Thalinger
bc7a239b90 7190416: JSR 292: typo in InvokerBytecodeGenerator.getConstantPoolSize
Reviewed-by: jrose
2012-08-09 15:03:28 -07:00
Joel Borggrén-Franck
4f5a96bc8b 7188442: rename java.lang.annotation.ContainerAnnotation to ContainedBy
Reviewed-by: darcy, jjg
2012-08-09 17:49:43 +02:00
Vinnie Ryan
790c4cdcec 7190945: pkcs11 problem loading NSS libs on Ubuntu
Reviewed-by: xuelei, alanb
2012-08-13 14:06:44 +01:00
Shirish Kuncolienkar
492ac282bf 7190254: NetworkInterface getFlags implementation should support full integer bit range for flags value
Reviewed-by: chegar
2012-08-13 13:41:23 +01:00
Jonathan Lu
f349c3da24 7190219: (bf) CharBuffer.put(String,int,int) modifies position even if BufferOverflowException thrown
Reviewed-by: alanb
2012-08-13 19:51:48 +08:00
Christian Schulte
d947b5d95a 7188755: Crash due to missing synchronization on gconf_client in DefaultProxySelector.c
Reviewed-by: chegar
2012-08-12 22:56:45 +01:00
Lana Steuck
e4f5fdbb4d Merge 2012-08-10 14:00:08 -07:00
Valerie Peng
a44a57d7b6 7185471: Avoid key expansion when AES cipher is re-init w/ the same key
Saved the last cipher key value and skip key expansion if key value is the same.

Reviewed-by: weijun, xuelei
2012-08-10 13:10:35 -07:00
Valerie Peng
919dca6024 7107616: scalability bloker in javax.crypto.JceSecurityManager
Changed the type of field "exemptCache" from HashMap to ConcurrentHashMap.

Reviewed-by: weijun, xuelei
2012-08-10 13:08:59 -07:00
Valerie Peng
21f7aaed74 7107613: scalability bloker in javax.crypto.CryptoPermissions
Changed the type of field "perms" from Hashtable to ConcurrentHashMap.

Reviewed-by: weijun, xuelei
2012-08-10 13:08:23 -07:00
Lana Steuck
db3fde2037 Merge 2012-08-10 12:48:22 -07:00
Sean Mullan
6a5d4204af Merge 2012-08-10 09:17:14 -04:00
Sean Mullan
c0dc8e53b5 7187962: sun.security.pkcs11.P11DSAKeyFactory.implTranslatePublicKey doesn't check if params is null
Reviewed-by: valeriep
2012-08-10 09:12:12 -04:00
Xueming Shen
ff93896a39 7189363: Regex Pattern compilation buggy for special sequences
Fixed the incorrect implementation in expr(...)

Reviewed-by: psandoz, alanb
2012-08-09 10:15:26 -07:00
Dmitry Samersoff
12ab6cc327 7183753: [TEST] Some colon in the diff for this test
Reference output file contains extra colon

Reviewed-by: sspitsyn, mgronlun
2012-08-09 14:52:12 +04:00
Vladimir Danushevsky
886fb99d53 Merge 2012-08-08 16:09:11 -04:00
Joseph Provino
b6622dce73 7153374: ARM ONLY .. linking problem with new compilers.. Need to use -fPIC
Add "arm" to the list of processors that need -fPIC

Reviewed-by: vladidan, dholmes
2012-08-08 15:43:51 -04:00
Athijegannathan Sundararajan
9724583022 7178324: Crash when compiling for(i : x) try(AutoCloseable x = ...) {}
Reviewed-by: darcy, jjg
2012-08-08 22:17:27 +05:30
Kumar Srinivasan
60ea1205b7 7189944: (launcher) test/tools/launcher/Arrrrghs.java needs a couple of minor fixes
Reviewed-by: darcy, jgish
2012-08-08 09:29:32 -07:00
Amy Lu
56779e429b 7189886: (aio) Add test coverage for AsynchronousChannelGroup.withThreadPool
Reviewed-by: alanb
2012-08-08 15:31:22 +01:00
Andrew John Hughes
b3ebff94ab 7189533: GetJavaProperties should free temporary file if subsequent allocations fails
Add missing calls to free

Reviewed-by: alanb, dholmes, sherman
2012-08-08 12:37:02 +01:00
Lana Steuck
e6f6b2dfda Merge 2012-08-07 20:24:18 -07:00
Lana Steuck
7fd65168fe Merge 2012-08-07 20:23:41 -07:00
Christian Thalinger
e622fcdc27 7188911: nightly failures after JSR 292 lazy method handle update (round 2)
Reviewed-by: kvn, jrose
2012-08-07 14:32:08 -07:00
Christian Thalinger
e52fc3fb2c 7188911: nightly failures after JSR 292 lazy method handle update (round 2)
Reviewed-by: kvn, jrose
2012-08-07 14:31:52 -07:00
Alejandro Murillo
eee7b367a1 7189729: jprt.properties should include release jdk7u8
Reviewed-by: jcoomes
2012-08-07 09:53:12 -07:00
Eric Wang
3ba6a2dff8 7076644: TEST_BUG: test/java/io/File/Basic.java fails with cygwin
Reviewed-by: alanb
2012-08-07 12:47:45 +01:00
Keith McGuigan
dbe25e46f3 7116786: RFE: Detailed information on VerifyErrors
Provide additional detail in VerifyError messages

Reviewed-by: sspitsyn, acorn
2012-08-06 15:54:45 -04:00
Brandon Mitchell
3234f913bb 6818524: G1: use ergonomic resizing of PLABs
Employ PLABStats instances to record information about survivor and old PLABs, and use the recorded stats to adjust the sizes of survivor and old PLABS.

Reviewed-by: johnc, ysr
2012-08-06 12:20:14 -07:00
Daniel D. Daugherty
75f8f79764 Merge 2012-08-06 09:34:40 -07:00
Volker Simonis
6c6a957121 7181175: Enable builds on Windows with MinGW/MSYS
This fix is the minimum number of Makefile changes to enable building HotSpot with MinGW/MSYS

Reviewed-by: jcoomes, dcubed, tbell, ohair
2012-08-03 18:34:28 -07:00
Alejandro Murillo
82446583c4 7189086: new hotspot build - hs24-b20
Reviewed-by: jcoomes
2012-08-03 13:24:02 -07:00
Abhijit Saha
ba9f0c030f Merge 2012-08-02 22:23:28 -07:00
Darryl Mocek
f001b9eb53 7187876: ClassCastException in TCPTransport.executeAcceptLoop
Reviewed-by: dholmes, smarks
2012-08-02 18:12:18 -07:00
Daniel D. Daugherty
4a848cf3e5 7188168: 7071904 broke the DEBUG_BINARIES option on Linux
Change DEBUG_BINARIES option logic to be more clear.

Reviewed-by: fparain, andrew
2012-08-02 14:54:14 -07:00
Abhijit Saha
4c3a0cd840 Merge 2012-08-02 14:29:12 -07:00
Maurizio Cimadamore
b1457fe814 7187104: Inference cleanup: remove redundant exception classes in Infer.java
Remove unused exception classes in Infer.java

Reviewed-by: jjg
2012-08-02 18:24:01 +01:00
Maurizio Cimadamore
a39622326e 7175538: Integrate efectively final check with DA/DU analysis
Allow generalized effectively-final analysis for all local variables

Reviewed-by: jjg, dlsmith
2012-08-02 18:23:21 +01:00
Maurizio Cimadamore
b03ad3ae09 7175911: Simplify error reporting API in Check.CheckContext interface
Make error messages generated during Check.checkType more uniform and more scalable

Reviewed-by: jjg, dlsmith
2012-08-02 18:22:41 +01:00
Sean Mullan
7a13d26b0c Merge 2012-08-02 10:42:19 -04:00
Jason Uh
1bbbba58c1 7026347: Certificate and X509CRL should have verify(PublicKey key, Provider sigProvider)
Reviewed-by: mullan, xuelei, weijun
2012-08-02 10:40:24 -04:00
Zhengyu Gu
38a6055c37 Merge 2012-08-01 16:16:13 -07:00
Zhengyu Gu
9047207b09 Merge 2012-08-01 15:00:50 -07:00
Christian Thalinger
e409ee94ae 7188276: JSR 292: assert(ct == T_OBJECT) failed: rt=T_OBJECT, ct=13
Reviewed-by: kvn, jrose
2012-08-01 14:44:26 -07:00
Zhengyu Gu
a13f3bdad8 7185614: NMT ON: "check by caller" assertion failed on nsk ThreadMXBean test
7187429: NMT ON: Merge failure should cause NMT to shutdown

Fixed NMT assertion failures

Reviewed-by: acorn, kvn
2012-08-01 17:19:30 -04:00
Omair Majid
d8dce91141 6844255: Potential stack corruption in GetJavaProperties
Use dynamically allocated buffers for temp and encoding.

Reviewed-by: alanb, andrew
2012-08-01 22:13:12 +01:00
Vladimir Kozlov
ebeff89a89 7188227: VM should recognize M-series SPARC
Check kstat data for SPARC-M.

Reviewed-by: roland
2012-08-01 14:10:32 -07:00
Coleen Phillimore
d52b3a7eb7 7129723: MAC: Some regression tests need to recognize Mac OS X platform
Add Darwin like Linux to shell scripts

Reviewed-by: kvn, kamg, dholmes
2012-08-01 16:52:43 -04:00
Sean Mullan
47403da7be Merge 2012-08-01 11:08:11 -04:00
Sean Mullan
771200f58c 7179715: OCSP revocation checking fails if the signer certificate is identified using the key ID
Reviewed-by: vinnie
2012-08-01 11:06:44 -04:00
Kumar Srinivasan
8ab8ef182e 7146424: Wildcard expansion for single entry classpath
Reviewed-by: dholmes, darcy, jjh, sherman
2012-07-31 06:14:28 -07:00
Akhil Arora
c0283983eb 7188114: (launcher) need an alternate command line parser for Windows
Reviewed-by: darcy, dholmes, jjh
2012-07-31 06:10:01 -07:00
Xueming Shen
b5bee4c17e 7188852: Move implementation of De/Inflater.getBytesRead/Writtten() to java from native
Re-implemented getBytesRead/Writtten() at java level

Reviewed-by: andrew, alanb
2012-08-03 13:40:03 -07:00
Vladimir Kozlov
5e05a0d592 7187454: stack overflow in C2 compiler thread on Solaris x86
Added new FormatBufferResource class to use thread's resource area for error message buffer.

Reviewed-by: twisti
2012-07-30 09:49:25 -07:00
Xue-Lei Andrew Fan
1c29d4299b 7186286: TLS implementation to better adhere to RFC
Also reviewed by Alexander Fomin <Alexander.Fomin@Oracle.COM>, Andrew Gross<Andrew.Gross@Oracle.COM>, Sean Coffey<Sean.Coffey@Oracle.COM>

Reviewed-by: valeriep, wetmore
2012-07-28 19:42:50 -07:00
Christian Thalinger
b9eb5785cc 7187290: nightly failures after JSR 292 lazy method handle update
Reviewed-by: kvn, twisti
2012-07-27 16:14:15 -07:00
Jim Gish
558e1362a9 6914123: (str) Missing synchronization in java.lang.String#contentEquals(CharSequence)
Change contentEquals( CharSequence cs ) to do synchronization if cs is a StringBuffer

Reviewed-by: mduigou
2012-07-27 16:17:11 -04:00
Oleg Pekhovskiy
79a36f32ee 7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE
Reviewed-by: art, ahgross
2012-07-25 19:46:00 +04:00
Christian Thalinger
12901d0e5b 7023639: JSR 292 method handle invocation needs a fast path for compiled code
6984705: JSR 292 method handle creation should not go through JNI

Remove assembly code for JDK 7 chained method handles

Co-authored-by: John Rose <john.r.rose@oracle.com>
Co-authored-by: Michael Haupt <michael.haupt@oracle.com>
Reviewed-by: jrose, twisti, kvn, mhaupt
2012-07-24 10:51:00 -07:00
Christian Thalinger
360d512854 7023639: JSR 292 method handle invocation needs a fast path for compiled code
6984705: JSR 292 method handle creation should not go through JNI

Remove assembly code for JDK 7 chained method handles

Co-authored-by: John Rose <john.r.rose@oracle.com>
Co-authored-by: Michael Haupt <michael.haupt@oracle.com>
Reviewed-by: jrose, twisti, mhaupt, forax
2012-07-24 10:47:44 -07:00
Oleg Pekhovskiy
f28b488994 7180036: Build failure in Mac platform caused by fix # 7163201
Reviewed-by: art, kizune, ahgross
2012-07-23 15:51:46 +04:00
Oleg Pekhovskiy
ffc9ae1245 7163201: Simplify toolkit internals references
Reviewed-by: art, anthony, ahgross
2012-08-30 13:11:23 -07:00
Sergey Malenkov
5f51412783 7183701: [TEST] closed/java/beans/security/TestClassFinder.java - compilation failed
Reviewed-by: rupashka
2012-07-31 21:01:56 +04:00
James Laskey
8bc65af302 7127687: MethodType leaks memory due to interning
Replace internTable with a weak-reference version.

Reviewed-by: sundar, forax, brutisso
2012-07-12 00:12:52 -07:00
John R Rose
c04c841a70 7087658: MethodHandles.Lookup.findVirtual is confused by interface methods that are multiply inherited
Reviewed-by: twisti
2012-07-12 00:12:28 -07:00
John R Rose
b9299f283f 7129034: VM crash with a field setter method with a filterArguments
Add null checks before unsafe calls that take a variable base reference; update unit tests

Reviewed-by: kvn, twisti
2012-07-12 00:11:35 -07:00
John R Rose
0d882ec317 7153157: ClassValue.get does not return if computeValue calls remove
Track intermediate states more precisely, according to spec.

Reviewed-by: twisti, forax
2012-07-12 00:10:53 -07:00
Dmitry Samersoff
5e84600efc 7169888: Narrowing resource definitions in JMX RMI connector
CPU bug, we can't put offending calls outside doPrivileged, but narrow granted permissions.

Reviewed-by: ahgross, fparain
2012-06-22 18:19:48 +04:00
Dmitry Samersoff
9a307c8287 7158796: Tighten properties checking in EnvHelp
Move getProperty call out of computeBooleanFromString

Reviewed-by: skoivu, sla
2012-06-22 16:22:22 +04:00
Stuart Marks
63cf10e500 7093490: adjust package access in rmiregistry
Reviewed-by: ahgross, coffeys, dmocek
2012-06-21 00:20:49 -07:00
Sergey Malenkov
386367a03f 7162476: XMLDecoder security issue via ClassFinder
Reviewed-by: art, ahgross
2012-06-19 20:34:06 +04:00
Sean Mullan
d87e57ac8a 7172522: Improve DomainCombiner checking
Reviewed-by: vinnie, ahgross
2012-06-18 10:00:55 -04:00
Sergey Malenkov
9ec1d58234 7162473: ConstructorFinder/FieldFinder/MethodFinder gives access to restricted classes
Reviewed-by: art, ahgross
2012-06-15 21:01:55 +04:00
Weijun Wang
a15896d20e 6631398: FilePermission improved path checking
Reviewed-by: mullan, skoivu, jdn
2012-06-15 09:51:09 +08:00
Keith McGuigan
c39971d4f1 7158804: Improve config file parsing
Check buffer length when reading

Reviewed-by: dholmes, dcubed
2012-06-08 12:49:12 -04:00
Sean Mullan
52f39f95df 7163198: Tightened package accessibility
7169887: Tightened package accessibility

Reviewed-by: vinnie, hawtin
2012-06-08 11:02:47 -04:00
Vladimir Kozlov
0a84e90eea 7158801: Improve VM CompileOnly option
Fixed buffer overflow during parsing flags -XX:CompileCommand=, -XX:CompileOnly= and command lines in .hotspot_compiler file.

Reviewed-by: never
2012-05-23 12:11:25 -07:00
Bradford Wetmore
3b10a3f9b8 7167656: Multiple Seeders are being created
Reviewed-by: smarks, mduigou, ahgross
2012-05-21 15:42:15 -07:00
Nils Eliasson
ac3b6a6442 7163863: Updated projectcreator
Enable source browsing for all platform dependent code

Reviewed-by: brutisso, coleenp
2012-03-29 16:43:21 +02:00
Christian Thalinger
0bae010a3b 7200001: failed C1 OSR compile doesn't get recompiled with C2
Reviewed-by: kvn
2012-09-24 17:59:24 -07:00
Vladimir Kozlov
913a550c76 Merge 2012-09-24 14:46:06 -07:00
Christian Thalinger
370f0c73b3 Merge 2012-09-24 12:31:47 -07:00
Tao Mao
c791cfaf95 7188176: The JVM should differentiate between T and M series and adjust GC ergonomics
Reviewed-by: kvn
2012-09-24 11:07:03 -07:00
Goetz Lindenmaier
5ada196961 7200163: add CodeComments functionality to assember stubs
Pass the codeBuffer to the Stub constructor, and adapts the disassembler to print the comments.

Reviewed-by: jrose, kvn, twisti
2012-09-24 10:30:14 -07:00
Roland Westrelin
302540691b 7023898: Intrinsify AtomicLongFieldUpdater.getAndIncrement()
Use shorter instruction sequences for atomic add and atomic exchange when possible.

Reviewed-by: kvn, jrose
2012-09-20 16:49:17 +02:00
Vladimir Kozlov
25f18c20d9 7199010: incorrect vector alignment
Fixed vectors alignment when several arrays are accessed in one loop.

Reviewed-by: roland, twisti
2012-09-19 16:50:26 -07:00
Aleksey Shipilev
3874f44d1c 7198499: TraceTypeProfile as diagnostic option
Reviewed-by: kvn
2012-09-19 10:38:12 -07:00
Vladimir Kozlov
811c047ec1 7196199: java/text/Bidi/Bug6665028.java failed: Bidi run count incorrect
Save whole XMM/YMM registers in safepoint interrupt handler.

Reviewed-by: roland, twisti
2012-09-17 19:39:07 -07:00
Vladimir Kozlov
45435c5485 7197033: missing ResourceMark for assert in Method::bci_from()
Added missing ResourceMark.

Reviewed-by: dholmes, coleenp, jmasa
2012-09-17 17:02:10 -07:00
Christian Thalinger
b0d292378a 7196262: JSR 292: java/lang/invoke/PrivateInvokeTest.java fails on solaris-sparc
Reviewed-by: kvn, jrose, bdelsart
2012-09-17 12:57:58 -07:00
Vinnie Ryan
1ad2cb3303 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
Reviewed-by: weijun
2012-02-14 11:18:32 +00:00
Dmytro Sheyko
2b51b9ab1a 6853676: OperatingSystemMXBean.TotalPhysicalMemorySize has incorrect value
Reviewed-by: alanb, dholmes, sla
2009-06-19 16:50:38 +03:00
Alan Bateman
ddd9274a10 7033824: TEST_BUG: java/nio/file/Files/CopyAndMove.java fails intermittently
Reviewed-by: chegar
2012-08-31 12:25:37 +01:00
Sean Coffey
0c39548e00 7195063: [TEST] jtreg flags com/sun/corba/cachedSocket/7056731.sh with Error failure
Reviewed-by: chegar
2012-08-31 12:25:29 +01:00
Joel Borggrén-Franck
9f5d367ff9 7151010: Add compiler support for repeating annotations
Reviewed-by: darcy, jjg
2012-08-31 10:52:17 +02:00
Stuart Marks
fac11519c4 7195099: update problem list with RMI test failures
Reviewed-by: alanb
2012-08-30 18:53:02 -07:00
Lana Steuck
e36810fd84 Merge 2012-08-30 16:51:46 -07:00
Sean Mullan
3a11096dee Merge 2012-08-30 14:42:10 -07:00
Stephen Flores
8081077ff5 6995421: Eliminate the static dependency to sun.security.ec.ECKeyFactory
Reviewed-by: mullan, vinnie
2012-08-30 14:40:57 -07:00
Dan Xu
f6d90bb347 7193683: DriverManager Iterator Warning cleanup
Reviewed-by: lancea
2012-08-30 13:38:03 -04:00
Dan Xu
be8df60f79 7193710: ByteArrayOutputStream Javadoc contains unclosed <code> element
Reviewed-by: dholmes, alanb, ulfzibis
2012-08-30 12:55:40 +01:00
Weijun Wang
a04e185cd1 7184815: [macosx] Need to read Kerberos config in files
Reviewed-by: valeriep
2012-08-29 11:03:02 +08:00
4407 changed files with 648599 additions and 202638 deletions

View File

@@ -1,6 +1,7 @@
^build/ ^build/
^dist/ ^dist/
/nbproject/private/ nbproject/private/
^webrev ^webrev
^.hgtip ^.hgtip
^.bridge2
.DS_Store .DS_Store

12
.hgtags
View File

@@ -172,3 +172,15 @@ b820143a6f1ce993c6e6f31db4d64de990f42654 jdk8-b47
086271e35b0a419b38e8bda9bebd70693811df0a jdk8-b48 086271e35b0a419b38e8bda9bebd70693811df0a jdk8-b48
cecd7026f30cbd83b0601925a7a5e059aec98138 jdk8-b49 cecd7026f30cbd83b0601925a7a5e059aec98138 jdk8-b49
38fe5ab028908cf64dd73a43336ba3211577bfc3 jdk8-b50 38fe5ab028908cf64dd73a43336ba3211577bfc3 jdk8-b50
382651d28f2502d371eca751962232c0e535e57a jdk8-b51
b67041a6cb508da18d2f5c7687e6a31e08bea4fc jdk8-b52
c7aa5cca1c01689a7b1a92411daf83684af05a33 jdk8-b53
7c6aa31ff1b2ae48c1c686ebe1aadf0c3da5be15 jdk8-b54
319f583f66db47395fa86127dd3ddb729eb7c64f jdk8-b55
ffe6bce5a521be40146af2ac03c509b7bac30595 jdk8-b56
2c21c080b11b93efb3851e39e1363e45da805943 jdk8-b57
479d3302a26d7607ba271d66973e59ebf58825b6 jdk8-b58
3bd874584fc01aae92fbc8827e2bd04d8b6ace04 jdk8-b59
5e3adc681779037a2d33b7be6f75680619085492 jdk8-b60
cdaa6122185f9bf512dcd6600f56bfccc4824e8c jdk8-b61
8d9d430b4244b95f5cf1ebe719f834a1ac5d6cd5 jdk8-b62

View File

@@ -172,3 +172,15 @@ e4f81a817447c3a4f6868f083c81c2fb1b15d44c jdk8-b44
3f6c72d1c2a6e5c9e7d81c3dc984886678a128ad jdk8-b48 3f6c72d1c2a6e5c9e7d81c3dc984886678a128ad jdk8-b48
c97b99424815c43818e3cc3ffcdd1a60f3198b52 jdk8-b49 c97b99424815c43818e3cc3ffcdd1a60f3198b52 jdk8-b49
2fd67618b9a3c847780ed7b9d228e862b6e2824c jdk8-b50 2fd67618b9a3c847780ed7b9d228e862b6e2824c jdk8-b50
57c0aee7309050b9d6cfcbd202dc704e9260b377 jdk8-b51
8d24def5ceb3b8f2e857f2e18b2804fc59eecf8d jdk8-b52
febd7ff5280067ca482faaeb9418ae88764c1a35 jdk8-b53
c1a277c6022affbc6855bdfb039511e73fbe2395 jdk8-b54
b85b44cced2406792cfb9baab1377ff03e7001d8 jdk8-b55
76844579fa4b30929731115b237e477181a82394 jdk8-b56
522dfac8ca4d07c0b74025d4ac3b6e5feefbb829 jdk8-b57
9367024804874faf8e958adeb333682bab1c0c47 jdk8-b58
dae9821589ccd2611bdf7084269b98e819091770 jdk8-b59
e07f499b9dccb529ecf74172cf6ac11a195ec57a jdk8-b60
20ff117b509075c3aec4ee3a57990ecd5db5df9c jdk8-b61
8a3fe0ae06a8cc21347da5a18384b0aa6c2349f5 jdk8-b62

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,16 @@
# questions. # questions.
# #
# If NEWBUILD is defined, use the new build-infra Makefiles and configure.
# See NewMakefile.gmk for more information.
ifeq ($(NEWBUILD),true)
# The new top level Makefile
include NewMakefile.gmk
else # Original Makefile logic
BUILD_PARENT_DIRECTORY=. BUILD_PARENT_DIRECTORY=.
# Basename of any originally supplied ALT_OUTPUTDIR directory # Basename of any originally supplied ALT_OUTPUTDIR directory
@@ -557,3 +567,5 @@ include ./make/jprt.gmk
# Force target # Force target
FRC: FRC:
endif # Original Makefile logic

295
NewMakefile.gmk Normal file
View File

@@ -0,0 +1,295 @@
#
# Copyright (c) 2012, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
# Utilities used in this Makefile
BASENAME=basename
CAT=cat
CD=cd
CMP=cmp
CP=cp
ECHO=echo
MKDIR=mkdir
PRINTF=printf
PWD=pwd
TAR=tar
ifeq ($(PLATFORM),windows)
ZIP=zip
else
# store symbolic links as the link
ZIP=zip -y
endif
# Insure we have a path that looks like it came from pwd
# (This is mostly for Windows sake and drive letters)
define UnixPath # path
$(shell (cd "$1" && $(PWD)))
endef
# Current root directory
CURRENT_DIRECTORY := $(shell $(PWD))
# Build directory root
BUILD_DIR_ROOT = $(CURRENT_DIRECTORY)/build
# All configured Makefiles to run
ALL_MAKEFILES = $(wildcard $(BUILD_DIR_ROOT)/*-*/Makefile)
# All bundles to create
ALL_IMAGE_DIRS = $(wildcard $(BUILD_DIR_ROOT)/*-*/images/*-image)
# Build all the standard 'all', 'images', and 'clean' targets
all images clean: checks
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
$(ECHO) "ERROR: No configurations to build"; exit 1; \
fi
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
$(ECHO) "$(CD) $${bdir} && $(MAKE) $@" ; \
$(CD) $${bdir} && $(MAKE) $@ ; \
done
# TBD: Deploy input
$(BUILD_DIR_ROOT)/.deploy_input:
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
$(ECHO) "ERROR: No configurations to build"; exit 1; \
fi
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
if [ deploy/make/Makefile ] ; then \
echo "Attempting deploy build." ; \
( \
$(RM) -r $${bdir}/deploy_input ; \
$(MKDIR) -p $${bdir}/deploy_input ; \
( $(CD) $${bdir}/images && $(TAR) -cf - j2sdk-image j2re-image ) \
| ( $(CD) $${bdir}/deploy_input && $(TAR) -xf - ) ; \
) ; \
fi; \
done
touch $@
# TBD: Deploy images
deploy: $(BUILD_DIR_ROOT)/.deploy_input
@if [ "$(ALL_MAKEFILES)" = "" ] ; then \
$(ECHO) "ERROR: No configurations to build"; exit 1; \
fi
@for bdir in $(dir $(ALL_MAKEFILES)) ; do \
if [ deploy/make/Makefile ] ; then \
echo "Attempting deploy build." ; \
( \
$(CD) deploy/make && \
$(MAKE) \
ABS_OUTPUTDIR=$${bdir}/deploy_input \
OUTPUTDIR=$${bdir}/deploy_input \
) ; \
fi; \
done
# TBD: Install bundles
install:
# Bundle creation
bundles:
@if [ "$(ALL_IMAGE_DIRS)" = "" ] ; then \
$(ECHO) "ERROR: No images to bundle"; exit 1; \
fi
@for i in $(ALL_IMAGE_DIRS) ; do \
$(MKDIR) -p $${i}/../../bundles && \
$(RM) $${i}/../../bundles/`$(BASENAME) $${i}`.zip && \
$(ECHO) "$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip ." && \
$(CD) $${i} && $(ZIP) -q -r ../../bundles/`$(BASENAME) $${i}`.zip . ; \
done
# Clobber all the built files
clobber::
$(RM) -r $(BUILD_DIR_ROOT)
# Make various checks to insure the build will be successful
# Possibilities:
# * Check that if any closed repo is provided, they all must be.
# * Check that all open repos exist, at least until we are ready for some
# kind of partial build.
checks:
@$(ECHO) "No checks yet"
# Keep track of user targets
USER_TARGETS += all deploy install images clean clobber checks
###########################################################################
# To help in adoption of the new configure&&make build process, a bridge
# build will use the old settings to run configure and do the build.
# Build with the configure bridge
bridgeBuild: bridge2configure images
# Bridge from old Makefile ALT settings to configure options
bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts
bash ./configure $(strip $(shell $(CAT) $<))
# Create a file with configure options created from old Makefile mechanisms.
$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest
$(RM) $@
$(CP) $< $@
# Use this file to only change when obvious things have changed
$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
$(RM) $@.tmp
$(MKDIR) -p $(BUILD_DIR_ROOT)
@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
ifdef ARCH_DATA_MODEL
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
endif
ifdef ALT_PARALLEL_COMPILE_JOBS
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
endif
ifdef ALT_BOOTDIR
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
endif
ifdef ALT_CUPS_HEADERS_PATH
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
endif
ifdef ALT_FREETYPE_HEADERS_PATH
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
endif
@if [ -f $@ ] ; then \
if ! $(CMP) $@ $@.tmp > /dev/null ; then \
$(CP) $@.tmp $@ ; \
fi ; \
else \
$(CP) $@.tmp $@ ; \
fi
$(RM) $@.tmp
# Clobber all the built files
clobber:: bridge2clobber
bridge2clobber::
$(RM) $(BUILD_DIR_ROOT)/.bridge2*
$(RM) $(BUILD_DIR_ROOT)/.deploy_input
# Keep track of phony targets
PHONY_LIST += bridge2configure bridgeBuild bridge2clobber
###########################################################################
# Sanity checks (history target)
#
sanity: checks
# Keep track of user targets
USER_TARGETS += sanity
###########################################################################
# Javadocs
#
javadocs:
cd common/makefiles && $(MAKE) -f MakefileJavadoc.gmk
# Keep track of user targets
USER_TARGETS += javadocs
###########################################################################
# JPRT targets
ifndef JPRT_ARCHIVE_BUNDLE
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
endif
jprt_build_product: DEBUG_LEVEL=release
jprt_build_product: BUILD_DIRNAME=*-release
jprt_build_product: jprt_build_generic
jprt_build_fastdebug: DEBUG_LEVEL=fastdebug
jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug
jprt_build_fastdebug: jprt_build_generic
jprt_build_debug: DEBUG_LEVEL=slowdebug
jprt_build_debug: BUILD_DIRNAME=*-debug
jprt_build_debug: jprt_build_generic
jprt_build_generic: $(JPRT_ARCHIVE_BUNDLE)
$(JPRT_ARCHIVE_BUNDLE): bridgeBuild bundles
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $(BUILD_DIR_ROOT)/$(BUILD_DIRNAME)/bundles/j2sdk-image.zip $@
# Keep track of phony targets
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \
jprt_build_generic
###########################################################################
# Help target
HELP_FORMAT=%12s%s\n
help:
@$(PRINTF) "# JDK Makefile\n"
@$(PRINTF) "#\n"
@$(PRINTF) "# Usage: make [Target]\n"
@$(PRINTF) "#\n"
@$(PRINTF) "# $(HELP_FORMAT)" "Target " "Description"
@$(PRINTF) "# $(HELP_FORMAT)" "------ " "-----------"
@for i in $(USER_TARGETS) ; do \
$(MAKE) help_$${i} ; \
done
@$(PRINTF) "#\n"
help_all:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Build the entire jdk but not the images"
help_images:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Create the jdk images for the builds"
help_deploy:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Create the jdk deploy images from the jdk images"
help_install:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Create the jdk install bundles from the deploy images"
help_clean:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Clean and prepare for a fresh build from scratch"
help_clobber:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Clean and also purge any hidden derived data"
help_checks:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Perform various checks to make sure we can build"
help_sanity:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Same as 'make checks'"
help_javadocs:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Build the javadocs"
help_help:
@$(PRINTF) "# $(HELP_FORMAT)" "$(subst help_,,$@) - " \
"Print out the help messages"
# Keep track of user targets
USER_TARGETS += help
###########################################################################
# Phony targets
.PHONY: $(PHONY_LIST) $(USER_TARGETS)
# Force target
FRC:

View File

@@ -96,7 +96,8 @@
</li> </li>
<li>Windows only: <li>Windows only:
<ul> <ul>
<li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>)</li> <li>Unix Command Tools (<a href="#cygwin">CYGWIN</a>) <strong>or</strong></li>
<li>Minimalist GNU for Windows (<a href="#msys">MinGW/MSYS</a>)</li>
<li><a href="#dxsdk">DirectX 9.0 SDK</a> </li> <li><a href="#dxsdk">DirectX 9.0 SDK</a> </li>
</ul> </ul>
</li> </li>
@@ -161,7 +162,7 @@
<blockquote> <blockquote>
This file often describes specific requirements for what we call the This file often describes specific requirements for what we call the
"minimum build environments" (MBE) for this "minimum build environments" (MBE) for this
specific release of the JDK, specific release of the JDK,
Building with the MBE will generate the most compatible Building with the MBE will generate the most compatible
bits that install on, and run correctly on, the most variations bits that install on, and run correctly on, the most variations
of the same base OS and hardware architecture. of the same base OS and hardware architecture.
@@ -241,16 +242,16 @@
</tbody> </tbody>
</table> </table>
<p> <p>
These same sources do indeed build on many more systems than the These same sources do indeed build on many more systems than the
above older generation systems, again the above is just a minimum. above older generation systems, again the above is just a minimum.
<p> <p>
Compilation problems with newer or different C/C++ compilers is a Compilation problems with newer or different C/C++ compilers is a
common problem. common problem.
Similarly, compilation problems related to changes to the Similarly, compilation problems related to changes to the
<tt>/usr/include</tt> or system header files is also a <tt>/usr/include</tt> or system header files is also a
common problem with newer or unreleased OS versions. common problem with newer or unreleased OS versions.
Please report these types of problems as bugs so that they Please report these types of problems as bugs so that they
can be dealt with accordingly. can be dealt with accordingly.
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<hr> <hr>
@@ -266,15 +267,15 @@
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://fedoraproject.org">Fedora</a> 9 After installing <a href="http://fedoraproject.org">Fedora</a> 9
you need to install several build dependencies. The simplest you need to install several build dependencies. The simplest
way to do it is to execute the following commands as user way to do it is to execute the following commands as user
<tt>root</tt>: <tt>root</tt>:
<p/> <p/>
<code>yum-builddep java-1.6.0-openjdk</code> <code>yum-builddep java-1.6.0-openjdk</code>
<p/> <p/>
<code>yum install gcc gcc-c++</code> <code>yum install gcc gcc-c++</code>
<p/> <p/>
In addition, it's necessary to set a few environment variables for the build: In addition, it's necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
@@ -283,15 +284,15 @@
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://fedoraproject.org">Fedora</a> 10 After installing <a href="http://fedoraproject.org">Fedora</a> 10
you need to install several build dependencies. The simplest you need to install several build dependencies. The simplest
way to do it is to execute the following commands as user way to do it is to execute the following commands as user
<tt>root</tt>: <tt>root</tt>:
<p/> <p/>
<code>yum-builddep java-1.6.0-openjdk</code> <code>yum-builddep java-1.6.0-openjdk</code>
<p/> <p/>
<code>yum install gcc gcc-c++</code> <code>yum install gcc gcc-c++</code>
<p/> <p/>
In addition, it's necessary to set a few environment variables for the build: In addition, it's necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
@@ -300,15 +301,15 @@
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://fedoraproject.org">Fedora</a> 11 After installing <a href="http://fedoraproject.org">Fedora</a> 11
you need to install several build dependencies. The simplest you need to install several build dependencies. The simplest
way to do it is to execute the following commands as user way to do it is to execute the following commands as user
<tt>root</tt>: <tt>root</tt>:
<p/> <p/>
<code>yum-builddep java-1.6.0-openjdk</code> <code>yum-builddep java-1.6.0-openjdk</code>
<p/> <p/>
<code>yum install gcc gcc-c++</code> <code>yum install gcc gcc-c++</code>
<p/> <p/>
In addition, it's necessary to set a few environment variables for the build: In addition, it's necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-openjdk</code>
@@ -360,16 +361,16 @@
<h4>Debian 5.0 (Lenny)</h4> <h4>Debian 5.0 (Lenny)</h4>
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://debian.org">Debian</a> 5 After installing <a href="http://debian.org">Debian</a> 5
you need to install several build dependencies. you need to install several build dependencies.
The simplest way to install the build dependencies is to The simplest way to install the build dependencies is to
execute the following commands as user <tt>root</tt>: execute the following commands as user <tt>root</tt>:
<p/> <p/>
<code>aptitude build-dep openjdk-6</code> <code>aptitude build-dep openjdk-6</code>
<p/> <p/>
<code>aptitude install openjdk-6-jdk libmotif-dev</code> <code>aptitude install openjdk-6-jdk libmotif-dev</code>
<p/> <p/>
In addition, it's necessary to set a few environment variables for the build: In addition, it's necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote> </blockquote>
@@ -380,52 +381,52 @@
<h4>Ubuntu 8.04</h4> <h4>Ubuntu 8.04</h4>
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04 After installing <a href="http://ubuntu.org">Ubuntu</a> 8.04
you need to install several build dependencies. you need to install several build dependencies.
<p/> <p/>
First, you need to enable the universe repository in the First, you need to enable the universe repository in the
Software Sources application and reload the repository Software Sources application and reload the repository
information. The Software Sources application is available information. The Software Sources application is available
under the System/Administration menu. under the System/Administration menu.
<p/> <p/>
The simplest way to install the build dependencies is to The simplest way to install the build dependencies is to
execute the following commands: execute the following commands:
<p/> <p/>
<code>sudo aptitude build-dep openjdk-6</code> <code>sudo aptitude build-dep openjdk-6</code>
<p/> <p/>
<code>sudo aptitude install openjdk-6-jdk</code> <code>sudo aptitude install openjdk-6-jdk</code>
<p/> <p/>
In addition, it's necessary to set a few environment variables for the build: In addition, it's necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote> </blockquote>
<h4>Ubuntu 8.10</h4> <h4>Ubuntu 8.10</h4>
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10 After installing <a href="http://ubuntu.org">Ubuntu</a> 8.10
you need to install several build dependencies. The simplest you need to install several build dependencies. The simplest
way to do it is to execute the following commands: way to do it is to execute the following commands:
<p/> <p/>
<code>sudo aptitude build-dep openjdk-6</code> <code>sudo aptitude build-dep openjdk-6</code>
<p/> <p/>
<code>sudo aptitude install openjdk-6-jdk</code> <code>sudo aptitude install openjdk-6-jdk</code>
<p/> <p/>
In addition, it's necessary to set a few environment variables for the build: In addition, it's necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote> </blockquote>
<h4>Ubuntu 9.04</h4> <h4>Ubuntu 9.04</h4>
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04 After installing <a href="http://ubuntu.org">Ubuntu</a> 9.04
you need to install several build dependencies. The simplest you need to install several build dependencies. The simplest
way to do it is to execute the following commands: way to do it is to execute the following commands:
<p/> <p/>
<code>sudo aptitude build-dep openjdk-6</code> <code>sudo aptitude build-dep openjdk-6</code>
<p/> <p/>
<code>sudo aptitude install openjdk-6-jdk</code> <code>sudo aptitude install openjdk-6-jdk</code>
<p/> <p/>
In addition, it's necessary to set a few environment variables for the build: In addition, it's necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk</code>
</blockquote> </blockquote>
@@ -436,20 +437,20 @@
<h4>OpenSUSE 11.1</h4> <h4>OpenSUSE 11.1</h4>
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1 After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1
you need to install several build dependencies. you need to install several build dependencies.
The simplest way to install the build dependencies is to The simplest way to install the build dependencies is to
execute the following commands: execute the following commands:
<p/> <p/>
<code>sudo zypper source-install -d java-1_6_0-openjdk</code> <code>sudo zypper source-install -d java-1_6_0-openjdk</code>
<p/> <p/>
<code>sudo zypper install make</code> <code>sudo zypper install make</code>
<p/> <p/>
In addition, it is necessary to set a few environment variables for the build: In addition, it is necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
<p/> <p/>
Finally, you need to unset the <code>JAVA_HOME</code> environment variable: Finally, you need to unset the <code>JAVA_HOME</code> environment variable:
<p/> <p/>
<code>export -n JAVA_HOME</code> <code>export -n JAVA_HOME</code>
</blockquote> </blockquote>
@@ -460,14 +461,14 @@
<h4>Mandriva Linux One 2009 Spring</h4> <h4>Mandriva Linux One 2009 Spring</h4>
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring After installing <a href="http://mandriva.org">Mandriva</a> Linux One 2009 Spring
you need to install several build dependencies. you need to install several build dependencies.
The simplest way to install the build dependencies is to The simplest way to install the build dependencies is to
execute the following commands as user <tt>root</tt>: execute the following commands as user <tt>root</tt>:
<p/> <p/>
<code>urpmi java-1.6.0-openjdk-devel ant make gcc gcc-c++ freetype-devel zip unzip libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel libxtst6-devel libxi-devel</code> <code>urpmi java-1.6.0-openjdk-devel ant make gcc gcc-c++ freetype-devel zip unzip libcups2-devel libxrender1-devel libalsa2-devel libstc++-static-devel libxtst6-devel libxi-devel</code>
<p/> <p/>
In addition, it is necessary to set a few environment variables for the build: In addition, it is necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code> <code>export LANG=C ALT_BOOTDIR=/usr/lib/jvm/java-1.6.0-openjdk</code>
</blockquote> </blockquote>
@@ -478,18 +479,18 @@
<h4>OpenSolaris 2009.06</h4> <h4>OpenSolaris 2009.06</h4>
<p> <p>
<blockquote> <blockquote>
After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06 After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06
you need to install several build dependencies. you need to install several build dependencies.
The simplest way to install the build dependencies is to The simplest way to install the build dependencies is to
execute the following commands: execute the following commands:
<p/> <p/>
<code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code> <code>pfexec pkg install SUNWgmake SUNWj6dev SUNWant sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2</code>
<p/> <p/>
In addition, it is necessary to set a few environment variables for the build: In addition, it is necessary to set a few environment variables for the build:
<p/> <p/>
<code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code> <code>export LANG=C ALT_COMPILER_PATH=/opt/SunStudioExpress/bin/ ALT_CUPS_HEADERS_PATH=/usr/include/</code>
<p/> <p/>
Finally, you need to make sure that the build process can find the Sun Studio compilers: Finally, you need to make sure that the build process can find the Sun Studio compilers:
<p/> <p/>
<code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code> <code>export PATH=$PATH:/opt/SunStudioExpress/bin/</code>
</blockquote> </blockquote>
@@ -687,31 +688,20 @@
</li> </li>
<li> <li>
<strong>Windows:</strong> <strong>Windows:</strong>
Make sure you start your build inside a bash/sh/ksh shell Make sure you start your build inside a bash/sh/ksh shell and are
and are using a <tt>make.exe</tt> utility built for that using a <tt>make.exe</tt> utility built for that environment.<br/>
environment (a cygwin <tt>make.exe</tt> is not the same <strong>MKS</strong> builds need a native Windows version of GNU make
as a <tt>make.exe</tt> built for something like (see <a href="#buildgmake">Building GNU make</a>).<br/>
<a href="http://www.mkssoftware.com/">MKS</a>). <strong>Cygwin</strong> builds need
<br> a make version which was specially compiled for the Cygwin environment
<b>WARNING:</b> Watch out on some make 3.81 versions, it may (see <a href="#buildgmake">Building GNU make</a>). <strong>WARNING:</strong>
not work due to a lack of support for MS-DOS drive letter paths the OpenJDK build with the make utility provided by Cygwin will <strong>not</strong>
like <tt>C:/</tt> or <tt>C:\</tt>. work because it does not support drive letters in paths. Make sure that
<br> your version of make will be found before the Cygwins default make by
You may be able to use the information at the setting an appropriate <tt>PATH</tt> environment variable or by removing
<a href="http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin#make" target="_blank"> Cygwin's make after you built your own make version.<br/>
mozilla developer center</a> <strong>MinGW/MSYS</strong> builds can use the default make which
on this topic. comes with the environment.
<br>
It's hoped that when make 3.82 starts shipping in a future cygwin
release that this MS-DOS path issue will be fixed.
<br>
It may be possible to download the version at
<a href="http://www.cmake.org/files/cygwin/make.exe">
www.cmake.org make.exe</a>.
<br>
It might be necessary for you to build your own GNU make 3.81,
see the <a href="#buildgmake">"Building GNU make"</a> section
in that case.
</li> </li>
</ul> </ul>
<p> <p>
@@ -727,7 +717,7 @@
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<h4><a name="buildgmake">Building GNU make</a></h4> <h4><a name="buildgmake">Building GNU make</a></h4>
<blockquote> <blockquote>
First step is to get the GNU make 3.81 source from First step is to get the GNU make 3.81 (or newer) source from
<a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank">
ftp.gnu.org/pub/gnu/make/</a>. ftp.gnu.org/pub/gnu/make/</a>.
Building is a little different depending on the OS and unix toolset Building is a little different depending on the OS and unix toolset
@@ -742,12 +732,24 @@
<tt>./configure && gmake CC=gcc</tt> <tt>./configure && gmake CC=gcc</tt>
</li> </li>
<li> <li>
<strong>Windows for CYGWIN:</strong> <strong>Windows for CYGWIN:</strong><br/>
<tt>./configure && make</tt> <tt>./configure</tt><br/>
Add the line <tt>#define HAVE_CYGWIN_SHELL 1</tt> to the end of <tt>config.h</tt><br/>
<tt>make</tt><br/>
<br/>
This should produce <tt>make.exe</tt> in the current directory.
</li> </li>
<li> <li>
<strong>Windows for MKS: (CYGWIN is recommended)</strong> <strong>Windows for MKS:</strong><br/>
<tt>./configure && make -f Makefile.win32</tt> Edit <tt>config.h.W32</tt> and uncomment the line <tt>#define HAVE_MKS_SHELL 1</tt><br/>
Set the environment for your native compiler (e.g. by calling:<br/>
<tt>"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Release /xp /x64)</tt>
<tt>nmake -f NMakefile.win32</tt>
<br/>
This should produce <tt>WinDebug/make.exe</tt> and <tt>WinRel/make.exe</tt>
<br/>
If you get the error: <tt>NMAKE : fatal error U1045: spawn failed : Permission denied</tt>
you have to set the <tt>Read &amp; execute</tt> permission for the file <tt>subproc.bat</tt>.
</li> </li>
</ul> </ul>
</blockquote> </blockquote>
@@ -894,39 +896,135 @@
<h4><a name="paths">Windows Paths</a></h4> <h4><a name="paths">Windows Paths</a></h4>
<blockquote> <blockquote>
<strong>Windows:</strong> <strong>Windows:</strong>
Note that GNU make is a historic utility and is based very Note that GNU make, the shell and other Unix-tools required during the build
heavily on shell scripting, so it does not tolerate the Windows habit do not tolerate the Windows habit
of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames. of having spaces in pathnames or the use of the <tt>\</tt>characters in pathnames.
Luckily on most Windows systems, you can use <tt>/</tt>instead of \, and Luckily on most Windows systems, you can use <tt>/</tt>instead of <tt>\</tt>, and
there is always a 'short' pathname without spaces for any path that there is always a short <a href="http://en.wikipedia.org/wiki/8.3_filename">
contains spaces. "8.3" pathname</a> without spaces for any path that contains spaces.
Unfortunately, this short pathname can be somewhat dynamic and the Unfortunately, this short pathname is somewhat dynamic (i.e. dependant on the
formula is difficult to explain. other files and directories inside a given directory) and can not be
You can use <tt>cygpath</tt> utility to map pathnames with spaces algorithmicly calculated by only looking at a specific path name.
or the <tt>\</tt>character into the <tt>C:/</tt> style of pathname
(called 'mixed'), e.g.
<tt>cygpath -s -m "<i>path</i>"</tt>.
<p> <p>
The makefiles will try to translate any pathnames supplied The makefiles will try to translate any pathnames supplied
to it into the <tt>C:/</tt> style automatically. to it into the <tt>C:/</tt> style automatically.
</p>
<p> <p>
Note that use of CYGWIN creates a unique problem with regards to Special care has to be taken if native Windows applications
like <tt>nmake</tt> or <tt>cl</tt> are called with file arguments processed
by Unix-tools like <tt>make</tt> or <tt>sh</tt>!
</p>
</blockquote>
<!-- ------------------------------------------------------ -->
<h4><a name="paths">Windows build environments</a></h4>
<blockquote>
Building on Windows requires a Unix-like environment, notably a Unix-like shell.
There are several such environments available of which
<a href="http://www.mkssoftware.com/products/tk/ds_tkdev.asp">MKS</a>,
<a href="http://www.cygwin.com/">Cygwin</a> and
<a href="http://www.mingw.org/wiki/MSYS">MinGW/MSYS</a> are currently supported for
the OpenJDK build. One of the differences of these three systems is the way
they handle Windows path names, particularly path names which contain
spaces, backslashes as path separators and possibly drive letters. Depending
on the use case and the specifics of each environment these path problems can
be solved by a combination of quoting whole paths, translating backslashes to
forward slashes, escaping backslashes with additional backslashes and
translating the path names to their <a href="http://en.wikipedia.org/wiki/8.3_filename">
"8.3" version</a>.
<p>
As of this writing (MKS ver. 9.4, Cygwin ver. 1.7.9, MinGW/MSYS 1.0.17),
MKS builds are known to be the fastest Windows builds while MingGW/MSYS
builds are slightly slower (about 10%) than MKS builds and Cygwin builds
require nearly twice the time (about 180%) of MKS builds (e.g. on a
DualCore i7 notebook with 8GB of RAM, HDD and 64-bit Windows 7 operating system
the complete OpenJDK 8 product build takes about 49min with MKS, 54min with
MinGW/MSYS and 88min with Cygwin).
</p>
<p>
Mixing tools from the different Unix emulation environments is not a good
idea and will probably not work!
</p>
<p>
<strong>MKS:</strong> is a commercial product which includes
all the Unix utilities which are required to build the OpenJDK except GNU
make. In pre-OpenJDK times it was the only supported build environment on
Windows. The MKS tools support Windows paths with drive letters and
forward slashes as path separator. Paths in environment variables like (for
example) <tt>PATH</tt> are separated by semicolon '<tt>;</tt>'.
</p>
<p>
Recent versions of MKS provide the <tt>dosname</tt> utility to convert paths
with spaces to short (8.3) path names,e .g.
<tt>dosname -s "<i>path</i>"</tt>.
</p>
<p>
If you are using the MKS environment, you need a native Windows version
of Gnu make <a href="#buildgmake">which you can easily build yourself</a>.
</p>
<p>
<strong>Cygwin:</strong>
is an open source, Linux-like environment which tries to emulate
a complete POSIX layer on Windows. It tries to be smart about path names
and can usually handle all kinds of paths if they are correctly quoted
or escaped although internally it maps drive letters <tt>&lt;drive&gt;:</tt>
to a virtual directory <tt>/cygdrive/&lt;drive&gt;</tt>.
</p>
<p>
You can always use the <tt>cygpath</tt> utility to map pathnames with spaces
or the backslash character into the <tt>C:/</tt> style of pathname
(called 'mixed'), e.g. <tt>cygpath -s -m "<i>path</i>"</tt>.
</p>
<p>
Note that the use of CYGWIN creates a unique problem with regards to
setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows setting <a href="#path"><tt>PATH</tt></a>. Normally on Windows
the <tt>PATH</tt> variable contains directories the <tt>PATH</tt> variable contains directories
separated with the ";" character (Solaris and Linux uses ":"). separated with the ";" character (Solaris and Linux use ":").
With CYGWIN, it uses ":", but that means that paths like "C:/path" With CYGWIN, it uses ":", but that means that paths like "C:/path"
cannot be placed in the CYGWIN version of <tt>PATH</tt> and cannot be placed in the CYGWIN version of <tt>PATH</tt> and
instead CYGWIN uses something like <tt>/cygdrive/c/path</tt> instead CYGWIN uses something like <tt>/cygdrive/c/path</tt>
which CYGWIN understands, but only CYGWIN understands. which CYGWIN understands, but only CYGWIN understands.
So be careful with paths on Windows. </p>
<p>
If you are using the Cygwin environment, you need to
<a href="#buildgmake">compile your own version</a>
of GNU make because the default Cygwin make can not handle drive letters in paths.
</p>
<p>
<strong>MinGW/MSYS:</strong>
MinGW ("Minimalist GNU for Windows") is a collection of free Windows
specific header files and import libraries combined with GNU toolsets that
allow one to produce native Windows programs that do not rely on any
3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building
applications and programs which rely on traditional UNIX tools to
be present. Among others this includes tools like <tt>bash</tt> and <tt>make</tt>.
</p>
<p>
Like Cygwin, MinGW/MSYS can handle different types of path formats. They
are internally converted to paths with forward slashes and drive letters
<tt>&lt;drive&gt;:</tt> replaced by a virtual
directory <tt>/&lt;drive&gt;</tt>. Additionally, MSYS automatically
detects binaries compiled for the MSYS environment and feeds them with the
internal, Unix-style path names. If native Windows applications are called
from within MSYS programs their path arguments are automatically converted
back to Windows style path names with drive letters and backslashes as
path separators. This may cause problems for Windows applications which
use forward slashes as parameter separator (e.g. <tt>cl /nologo /I</tt>)
because MSYS may wrongly <a href="http://mingw.org/wiki/Posix_path_conversion">
replace such parameters by drive letters</a>.
</p>
<p>
If you are using the MinGW/MSYS system you can use the default make
version supplied by the environment.
</p>
</blockquote> </blockquote>
<!-- ------------------------------------------------------ --> <!-- ------------------------------------------------------ -->
<h4><a name="windows_checklist">Basic Windows Check List</a></h4> <h4><a name="windows_checklist">Basic Windows Check List</a></h4>
<blockquote> <blockquote>
<ol> <ol>
<li> <li>
Install the Install one of the
<a href="#cygwin">CYGWIN product</a>. <a href="#cygwin">CYGWIN</a>, <a href="#msys">MinGW/MSYS</a> or
<a href="http://www.mkssoftware.com/products/tk/ds_tkdev.asp">MKS</a> environments.
</li> </li>
<li> <li>
Install the Install the
@@ -1097,9 +1195,9 @@
<a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank"> <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank">
Sun Studio 12 Update 1 Compilers</a> Sun Studio 12 Update 1 Compilers</a>
(containing version 5.10 of the C and C++ compilers) is required, (containing version 5.10 of the C and C++ compilers) is required,
including specific patches. including specific patches.
<p> <p>
The Solaris SPARC patch list is: The Solaris SPARC patch list is:
<ul> <ul>
<li> <li>
118683-05: SunOS 5.10: Patch for profiling libraries and assembler 118683-05: SunOS 5.10: Patch for profiling libraries and assembler
@@ -1286,7 +1384,8 @@
The XRender header file is included with the other X11 header files The XRender header file is included with the other X11 header files
in the package <strong>SFWxwinc</strong> on new enough versions of in the package <strong>SFWxwinc</strong> on new enough versions of
Solaris and will be installed in Solaris and will be installed in
<tt>/usr/X11/include/X11/extensions/Xrender.h</tt> <tt>/usr/X11/include/X11/extensions/Xrender.h</tt> or
<tt>/usr/openwin/share/include/X11/extensions/Xrender.h</tt>
</p><p> </p><p>
<strong>Linux:</strong> <strong>Linux:</strong>
XRender header files are required for building the XRender header files are required for building the
@@ -1456,7 +1555,9 @@
<td>Devel</td> <td>Devel</td>
<td>make</td> <td>make</td>
<td>The GNU version of the 'make' utility built for CYGWIN.<br> <td>The GNU version of the 'make' utility built for CYGWIN.<br>
<b>NOTE</b>: See <a href="#gmake">the GNU make section</a></td> <b>NOTE</b>: the Cygwin make can not be used to build the
OpenJDK. You only need it to build your own version of make
(see <a href="#gmake">the GNU make section</a>)</td>
</tr> </tr>
<tr> <tr>
<td>m4.exe</td> <td>m4.exe</td>
@@ -1521,6 +1622,21 @@
So it's important that the Visual Studio paths in PATH preceed So it's important that the Visual Studio paths in PATH preceed
the CYGWIN path <tt>/usr/bin</tt>. the CYGWIN path <tt>/usr/bin</tt>.
</blockquote> </blockquote>
<strong> Minimalist GNU for Windows (<a name="msys">MinGW/MSYS</a>)</strong>
<blockquote>
Alternatively, the set of unix command tools for the OpenJDK build on
Windows can be supplied by
<a href="http://www.mingw.org/wiki/MSYS" target="_blank">MinGW/MSYS</a>.
<p>
In addition to the tools which will be installed by default, you have
to manually install the <tt>msys-zip</tt> and <tt>msys-unzip</tt> packages.
This can be easily done with the MinGW command line installer:<br/>
<tt><br/>
mingw-get.exe install msys-zip<br/>
mingw-get.exe install msys-unzip<br/>
</tt>
</p>
</blockquote>
<strong><a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</a></strong> <strong><a name="dxsdk">Microsoft DirectX 9.0 SDK header files and libraries</a></strong>
<blockquote> <blockquote>
Microsoft DirectX 9.0 SDK (Summer 2004) Microsoft DirectX 9.0 SDK (Summer 2004)
@@ -1781,10 +1897,10 @@
</dd> </dd>
<dt><a name="ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a></dt> <dt><a name="ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a></dt>
<dd> <dd>
The top-level directory of the libraries and include files for the platform's The top-level directory of the libraries and include files for the platform's
graphical programming environment. The default location is platform specific. graphical programming environment. The default location is platform specific.
For example, on Linux it defaults to <tt>/usr/X11R6/</tt>. For example, on Linux it defaults to <tt>/usr/X11R6/</tt>.
</dd> </dd>
<dt><strong>Windows specific:</strong></dt> <dt><strong>Windows specific:</strong></dt>
<dd> <dd>
<dl> <dl>
@@ -1792,9 +1908,9 @@
<dd> <dd>
The location of the The location of the
Microsoft Windows SDK where some tools will be Microsoft Windows SDK where some tools will be
located. located.
The default is whatever WINDOWSSDKDIR is set to The default is whatever WINDOWSSDKDIR is set to
(or WindowsSdkDir) or the path (or WindowsSdkDir) or the path
<br> <br>
<tt>c:\Program Files\Microsoft SDKs\Windows\v7.0a</tt> <tt>c:\Program Files\Microsoft SDKs\Windows\v7.0a</tt>
</dd> </dd>
@@ -1823,17 +1939,17 @@
is that <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> is set is that <a href="#ALT_COMPILER_PATH"><tt>ALT_COMPILER_PATH</tt></a> is set
to point to the cross-compiler and that any cross-compilation specific flags to point to the cross-compiler and that any cross-compilation specific flags
are passed using <a href="#EXTRA_CFLAGS"><tt>EXTRA_CFLAGS</tt></a>. are passed using <a href="#EXTRA_CFLAGS"><tt>EXTRA_CFLAGS</tt></a>.
The <a href="#ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a> variable should The <a href="#ALT_OPENWIN_HOME"><tt>ALT_OPENWIN_HOME</tt></a> variable should
also be set to point to the graphical header files (e.g. X11) provided with also be set to point to the graphical header files (e.g. X11) provided with
the cross-compiler. the cross-compiler.
When cross-compiling we skip execution of any demos etc that may be built, and When cross-compiling we skip execution of any demos etc that may be built, and
also skip binary-file verification. also skip binary-file verification.
</dd> </dd>
<dt><tt><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></tt> </dt> <dt><tt><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></tt> </dt>
<dd> <dd>
Used to pass cross-compilation options to the cross-compiler. Used to pass cross-compilation options to the cross-compiler.
These are added to the <tt>CFLAGS</tt> and <tt>CXXFLAGS</tt> variables. These are added to the <tt>CFLAGS</tt> and <tt>CXXFLAGS</tt> variables.
</dd> </dd>
<dt><tt><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></tt> </dt> <dt><tt><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></tt> </dt>
<dd> <dd>
Used primarily for cross-compilation builds (and always set in that case) Used primarily for cross-compilation builds (and always set in that case)
@@ -1868,23 +1984,23 @@
<dt><tt><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</tt> </dt> <dt><tt><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</tt> </dt>
<dd> <dd>
Used when the build environment has no graphical capabilities at all. This Used when the build environment has no graphical capabilities at all. This
excludes building anything that requires graphical libraries to be available. excludes building anything that requires graphical libraries to be available.
</dd> </dd>
<dt><tt><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</tt> </dt> <dt><tt><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</tt> </dt>
<dd> <dd>
Used to indicate this is a build of the Oracle Java SE Embedded product. Used to indicate this is a build of the Oracle Java SE Embedded product.
This will enable the directives included in the SE-Embedded specific build This will enable the directives included in the SE-Embedded specific build
files. files.
</dd> </dd>
<dt><tt><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></tt> </dt> <dt><tt><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></tt> </dt>
<dd> <dd>
If set to false, disables the use of mmap by the zip utility. Otherwise, If set to false, disables the use of mmap by the zip utility. Otherwise,
mmap will be used. mmap will be used.
</dd> </dd>
<dt><tt><a name="COMPRESS_JARS"></a>COMPRESS_JARS</tt> </dt> <dt><tt><a name="COMPRESS_JARS"></a>COMPRESS_JARS</tt> </dt>
<dd> <dd>
If set to true, causes certain jar files that would otherwise be built without If set to true, causes certain jar files that would otherwise be built without
compression, to use compression. compression, to use compression.
</dd> </dd>
</dl> </dl>
</dd> </dd>

View File

@@ -21,6 +21,7 @@
# questions. # questions.
# #
# Generated Makefile @DATE_WHEN_CONFIGURED@ # This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
# GENERATED FILE, DO NOT EDIT
SPEC:=@OUTPUT_ROOT@/spec.gmk SPEC:=@OUTPUT_ROOT@/spec.gmk
include @SRC_ROOT@/common/makefiles/Makefile include @SRC_ROOT@/common/makefiles/Makefile

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -23,18 +23,41 @@
# #
script_dir=`dirname $0` script_dir=`dirname $0`
closed_script_dir="$script_dir/../../jdk/make/closed/autoconf"
# Create a timestamp as seconds since epoch # Create a timestamp as seconds since epoch
TIMESTAMP=`date +%s` if test "x`uname -s`" = "xSunOS"; then
# date +%s is not available on Solaris, use this workaround
# from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html
TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 | nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'`
else
TIMESTAMP=`date +%s`
fi
if test "x$CUSTOM_CONFIG_DIR" = "x"; then
custom_script_dir="$script_dir/../../jdk/make/closed/autoconf"
else
custom_script_dir=$CUSTOM_CONFIG_DIR
fi
custom_hook=$custom_script_dir/custom-hook.m4
if test "x`which autoconf 2> /dev/null`" = x; then
echo You need autoconf installed to be able to regenerate the configure script
echo Error: Cannot find autoconf 1>&2
exit 1
fi
echo Generating generated-configure.sh
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | autoconf -W all -I$script_dir - > $script_dir/generated-configure.sh
rm -rf autom4te.cache rm -rf autom4te.cache
if test -e $closed_script_dir/closed-hook.m4; then if test -e $custom_hook; then
# We have closed sources available; also generate configure script echo Generating custom generated-configure.sh
# with closed hooks compiled in. # We have custom sources available; also generate configure script
# with custom hooks compiled in.
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \ cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
sed -e "s|AC_DEFUN_ONCE(\[CLOSED_HOOK\])|m4_include([$closed_script_dir/closed-hook.m4])|" | autoconf -W all -I$script_dir - > $closed_script_dir/generated-configure.sh sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | autoconf -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
rm -rf autom4te.cache rm -rf autom4te.cache
else
echo No custom hook found: $custom_hook
fi fi

View File

@@ -34,80 +34,102 @@ AC_DEFUN([ADD_JVM_ARG_IF_OK],
fi fi
]) ])
AC_DEFUN([WHICHCMD], # This will make sure the given variable points to a full and proper
# path. This means:
# 1) There will be no spaces in the path. On posix platforms,
# spaces in the path will result in an error. On Windows,
# the path will be rewritten using short-style to be space-free.
# 2) The path will be absolute, and it will be in unix-style (on
# cygwin).
# $1: The name of the variable to fix
AC_DEFUN([BASIC_FIXUP_PATH],
[ [
# Translate "gcc -E" into "`which gcc` -E" ie if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# extract the full path to the binary and at the BASIC_FIXUP_PATH_CYGWIN($1)
# same time maintain any arguments passed to it. elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# The command MUST exist in the path, or else! BASIC_FIXUP_PATH_MSYS($1)
tmp="[$]$1" else
car="${tmp%% *}" # We're on a posix platform. Hooray! :)
tmp="[$]$1 EOL" path="[$]$1"
cdr="${tmp#* }"
# On windows we want paths without spaces.
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
WHICHCMD_SPACESAFE(car)
else
# "which" is not portable, but is used here
# because we know that the command exists!
car=`which $car`
fi
if test "x$cdr" != xEOL; then
$1="$car ${cdr% *}"
else
$1="$car"
fi
])
AC_DEFUN([SPACESAFE],
[
# Fail with message $2 if var $1 contains a path with no spaces in it.
# Unless on Windows, where we can rewrite the path.
HAS_SPACE=`echo "[$]$1" | grep " "`
if test "x$HAS_SPACE" != x; then
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
$1=`$CYGPATH -s -m -a "[$]$1"`
$1=`$CYGPATH -u "[$]$1"`
else
AC_MSG_ERROR([You cannot have spaces in $2! "[$]$1"])
fi
fi
])
AC_DEFUN([WHICHCMD_SPACESAFE],
[
# Translate long cygdrive or C:\sdfsf path
# into a short mixed mode path that has no
# spaces in it.
tmp="[$]$1"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then if test ! -f "$path" && test ! -d "$path"; then
tmp=`$CYGPATH -u "[$]$1"` AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
tmp=`which "$tmp"`
# If file exists with .exe appended, that's the real filename
# and cygpath needs that to convert to short style path.
if test -f "${tmp}.exe"; then
tmp="${tmp}.exe"
elif test -f "${tmp}.cmd"; then
tmp="${tmp}.cmd"
fi
# Convert to C:/ mixed style path without spaces.
tmp=`$CYGPATH -s -m "$tmp"`
fi fi
$1="$tmp"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
AC_MSG_ERROR([Spaces are not allowed in this path.])
fi
fi
]) ])
AC_DEFUN([REMOVE_SYMBOLIC_LINKS], # This will make sure the given variable points to a executable
# with a full and proper path. This means:
# 1) There will be no spaces in the path. On posix platforms,
# spaces in the path will result in an error. On Windows,
# the path will be rewritten using short-style to be space-free.
# 2) The path will be absolute, and it will be in unix-style (on
# cygwin).
# Any arguments given to the executable is preserved.
# If the input variable does not have a directory specification, then
# it need to be in the PATH.
# $1: The name of the variable to fix
AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
[
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
BASIC_FIXUP_EXECUTABLE_CYGWIN($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
BASIC_FIXUP_EXECUTABLE_MSYS($1)
else
# We're on a posix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
new_path=`$WHICH $path 2> /dev/null`
if test "x$new_path" = x; then
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test "x$is_absolute_path" != x; then
AC_MSG_NOTICE([Resolving $1 (as $path) with 'which' failed, using $path directly.])
new_path="$path"
else
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
else
new_complete="$new_path"
fi
if test "x$complete" != "x$new_complete"; then
$1="$new_complete"
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
fi
])
AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
[ [
if test "x$OPENJDK_BUILD_OS" != xwindows; then if test "x$OPENJDK_BUILD_OS" != xwindows; then
# Follow a chain of symbolic links. Use readlink # Follow a chain of symbolic links. Use readlink
# where it exists, else fall back to horribly # where it exists, else fall back to horribly
# complicated shell code. # complicated shell code.
AC_PATH_PROG(READLINK, readlink)
if test "x$READLINK_TESTED" != yes; then if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different # On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink. # purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | grep GNU` ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
if test "x$ISGNU" = x; then if test "x$ISGNU" = x; then
# A readlink that we do not know how to use. # A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there? # Are there other non-GNU readlinks out there?
@@ -121,23 +143,25 @@ AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
else else
STARTDIR=$PWD STARTDIR=$PWD
COUNTER=0 COUNTER=0
DIR=`dirname [$]$1` sym_link_dir=`$DIRNAME [$]$1`
FIL=`basename [$]$1` sym_link_file=`$BASENAME [$]$1`
while test $COUNTER -lt 20; do while test $COUNTER -lt 20; do
ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'` ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done! # This is not a symbolic link! We are done!
break break
fi fi
# The link might be relative! We have to use cd to travel safely. # The link might be relative! We have to use cd to travel safely.
cd $DIR cd $sym_link_dir
cd `dirname $ISLINK` # ... and we must get the to the absolute path, not one using symbolic links.
DIR=`pwd` cd `pwd -P`
FIL=`basename $ISLINK` cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD`
sym_link_file=`$BASENAME $ISLINK`
let COUNTER=COUNTER+1 let COUNTER=COUNTER+1
done done
cd $STARTDIR cd $STARTDIR
$1=$DIR/$FIL $1=$sym_link_dir/$sym_link_file
fi fi
fi fi
]) ])
@@ -148,59 +172,176 @@ AC_DEFUN_ONCE([BASIC_INIT],
AC_SUBST(CONFIGURE_COMMAND_LINE) AC_SUBST(CONFIGURE_COMMAND_LINE)
DATE_WHEN_CONFIGURED=`LANG=C date` DATE_WHEN_CONFIGURED=`LANG=C date`
AC_SUBST(DATE_WHEN_CONFIGURED) AC_SUBST(DATE_WHEN_CONFIGURED)
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
# Locate the directory of this script. AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
SCRIPT="[$]0"
REMOVE_SYMBOLIC_LINKS(SCRIPT)
AUTOCONF_DIR=`dirname [$]0`
]) ])
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
# $1: variable to check
# $2: executable name to print in warning (optional)
AC_DEFUN([BASIC_CHECK_NONEMPTY],
[
if test "x[$]$1" = x; then
if test "x$2" = x; then
PROG_NAME=translit($1,A-Z,a-z)
else
PROG_NAME=$2
fi
AC_MSG_NOTICE([Could not find $PROG_NAME!])
AC_MSG_ERROR([Cannot continue])
fi
])
# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
# Arguments as AC_PATH_PROG:
# $1: variable to set
# $2: executable name to look for
AC_DEFUN([BASIC_REQUIRE_PROG],
[
AC_PATH_PROGS($1, $2)
BASIC_CHECK_NONEMPTY($1, $2)
])
# Setup the most fundamental tools that relies on not much else to set up,
# but is used by much of the early bootstrap code.
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
[
# Start with tools that do not need have cross compilation support
# and can be expected to be found in the default PATH. These tools are
# used by configure. Nor are these tools expected to be found in the
# devkit from the builddeps server either, since they are
# needed to download the devkit.
# First are all the simple required tools.
BASIC_REQUIRE_PROG(BASENAME, basename)
BASIC_REQUIRE_PROG(BASH, bash)
BASIC_REQUIRE_PROG(CAT, cat)
BASIC_REQUIRE_PROG(CHMOD, chmod)
BASIC_REQUIRE_PROG(CMP, cmp)
BASIC_REQUIRE_PROG(CP, cp)
BASIC_REQUIRE_PROG(CUT, cut)
BASIC_REQUIRE_PROG(DATE, date)
BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
BASIC_REQUIRE_PROG(DIRNAME, dirname)
BASIC_REQUIRE_PROG(ECHO, echo)
BASIC_REQUIRE_PROG(EXPR, expr)
BASIC_REQUIRE_PROG(FILE, file)
BASIC_REQUIRE_PROG(FIND, find)
BASIC_REQUIRE_PROG(HEAD, head)
BASIC_REQUIRE_PROG(LN, ln)
BASIC_REQUIRE_PROG(LS, ls)
BASIC_REQUIRE_PROG(MKDIR, mkdir)
BASIC_REQUIRE_PROG(MKTEMP, mktemp)
BASIC_REQUIRE_PROG(MV, mv)
BASIC_REQUIRE_PROG(PRINTF, printf)
BASIC_REQUIRE_PROG(THEPWDCMD, pwd)
BASIC_REQUIRE_PROG(RM, rm)
BASIC_REQUIRE_PROG(SH, sh)
BASIC_REQUIRE_PROG(SORT, sort)
BASIC_REQUIRE_PROG(TAIL, tail)
BASIC_REQUIRE_PROG(TAR, tar)
BASIC_REQUIRE_PROG(TEE, tee)
BASIC_REQUIRE_PROG(TOUCH, touch)
BASIC_REQUIRE_PROG(TR, tr)
BASIC_REQUIRE_PROG(UNAME, uname)
BASIC_REQUIRE_PROG(UNIQ, uniq)
BASIC_REQUIRE_PROG(WC, wc)
BASIC_REQUIRE_PROG(WHICH, which)
BASIC_REQUIRE_PROG(XARGS, xargs)
# Then required tools that require some special treatment.
AC_PROG_AWK
BASIC_CHECK_NONEMPTY(AWK)
AC_PROG_GREP
BASIC_CHECK_NONEMPTY(GREP)
AC_PROG_EGREP
BASIC_CHECK_NONEMPTY(EGREP)
AC_PROG_FGREP
BASIC_CHECK_NONEMPTY(FGREP)
AC_PROG_SED
BASIC_CHECK_NONEMPTY(SED)
AC_PATH_PROGS(NAWK, [nawk gawk awk])
BASIC_CHECK_NONEMPTY(NAWK)
# Always force rm.
RM="$RM -f"
# These are not required on all platforms
AC_PATH_PROG(CYGPATH, cygpath)
AC_PATH_PROG(READLINK, readlink)
AC_PATH_PROG(DF, df)
AC_PATH_PROG(SETFILE, SetFile)
])
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
AC_DEFUN_ONCE([BASIC_SETUP_PATHS], AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
[ [
# Locate the directory of this script.
SCRIPT="[$]0"
BASIC_REMOVE_SYMBOLIC_LINKS(SCRIPT)
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
# Where is the source? It is located two levels above the configure script. # Where is the source? It is located two levels above the configure script.
CURDIR="$PWD" CURDIR="$PWD"
cd "$AUTOCONF_DIR/../.." cd "$AUTOCONF_DIR/../.."
SRC_ROOT="`pwd`" SRC_ROOT="`pwd`"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
SRC_ROOT_LENGTH=`pwd|wc -m` if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
if test $SRC_ROOT_LENGTH -gt 100; then PATH_SEP=";"
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported]) BASIC_CHECK_PATHS_WINDOWS
fi else
PATH_SEP=":"
fi fi
AC_SUBST(SRC_ROOT) AC_SUBST(SRC_ROOT)
AC_SUBST(PATH_SEP)
cd "$CURDIR" cd "$CURDIR"
SPACESAFE(SRC_ROOT,[the path to the source root]) BASIC_FIXUP_PATH(SRC_ROOT)
SPACESAFE(CURDIR,[the path to the current directory]) BASIC_FIXUP_PATH(CURDIR)
])
AC_DEFUN_ONCE([BASIC_SETUP_SEARCHPATH],
[
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
# Add extra search paths on solaris for utilities like ar and as etc... # Add extra search paths on solaris for utilities like ar and as etc...
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
fi fi
])
AC_DEFUN_ONCE([BASIC_SETUP_PATH_SEP], # You can force the sys-root if the sys-root encoded into the cross compiler tools
[ # is not correct.
# For cygwin we need cygpath first, since it is used everywhere. AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
AC_PATH_PROG(CYGPATH, cygpath) [pass this sys-root to the compilers and tools (for cross-compiling)])])
PATH_SEP=":"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then if test "x$with_sys_root" != x; then
if test "x$CYGPATH" = x; then SYS_ROOT=$with_sys_root
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path]) else
fi SYS_ROOT=/
PATH_SEP=";"
fi fi
AC_SUBST(PATH_SEP) AC_SUBST(SYS_ROOT)
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
[search this directory for compilers and tools (for cross-compiling)])], [TOOLS_DIR=$with_tools_dir])
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
[use this directory as base for tools-dir and sys-root (for cross-compiling)])],
[
if test "x$with_sys_root" != x; then
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
fi
if test "x$with_tools_dir" != x; then
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
fi
TOOLS_DIR=$with_devkit/bin
SYS_ROOT=$with_devkit/$host_alias/libc
])
]) ])
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
[ [
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name], AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
[use this as the name of the configuration, overriding the generated default])], [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
[ CONF_NAME=${with_conf_name} ]) [ CONF_NAME=${with_conf_name} ])
# Test from where we are running configure, in or outside of src root. # Test from where we are running configure, in or outside of src root.
@@ -211,7 +352,7 @@ if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || te
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
fi fi
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
mkdir -p "$OUTPUT_ROOT" $MKDIR -p "$OUTPUT_ROOT"
if test ! -d "$OUTPUT_ROOT"; then if test ! -d "$OUTPUT_ROOT"; then
AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT]) AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
fi fi
@@ -224,9 +365,30 @@ else
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
fi fi
OUTPUT_ROOT="$CURDIR" OUTPUT_ROOT="$CURDIR"
fi
SPACESAFE(OUTPUT_ROOT,[the path to the output root]) # WARNING: This might be a bad thing to do. You need to be sure you want to
# have a configuration in this directory. Do some sanity checks!
if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
# If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
# other files
files_present=`$LS $OUTPUT_ROOT`
if test "x$files_present" != x; then
AC_MSG_NOTICE([Current directory is $CURDIR.])
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
AC_MSG_NOTICE([seriously mess up just about everything.])
AC_MSG_NOTICE([Try 'cd $SRC_ROOT' and restart configure])
AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
fi
fi
fi
AC_MSG_CHECKING([what configuration name to use])
AC_MSG_RESULT([$CONF_NAME])
BASIC_FIXUP_PATH(OUTPUT_ROOT)
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk) AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
AC_SUBST(CONF_NAME, $CONF_NAME) AC_SUBST(CONF_NAME, $CONF_NAME)
@@ -236,7 +398,13 @@ AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in]) AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
# The spec.gmk file contains all variables for the make system. # The spec.gmk file contains all variables for the make system.
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
# The spec.sh file contains variables for compare{images|-objects}.sh scrips. # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
# The bootcycle-spec.gmk file contains support for boot cycle builds.
AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
# The compare.sh is used to compare the build output to other builds.
AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
# Spec.sh is currently used by compare-objects.sh
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
# The generated Makefile knows where the spec.gmk is and where the source is. # The generated Makefile knows where the spec.gmk is and where the source is.
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
@@ -252,7 +420,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
# Setup default logging of stdout and stderr to build.log in the output root. # Setup default logging of stdout and stderr to build.log in the output root.
BUILD_LOG='$(OUTPUT_ROOT)/build.log' BUILD_LOG='$(OUTPUT_ROOT)/build.log'
BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old' BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)' BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
AC_SUBST(BUILD_LOG) AC_SUBST(BUILD_LOG)
AC_SUBST(BUILD_LOG_PREVIOUS) AC_SUBST(BUILD_LOG_PREVIOUS)
AC_SUBST(BUILD_LOG_WRAPPER) AC_SUBST(BUILD_LOG_WRAPPER)
@@ -261,13 +429,104 @@ AC_SUBST(BUILD_LOG_WRAPPER)
#%%% Simple tools %%% #%%% Simple tools %%%
# Check if we have found a usable version of make
# $1: the path to a potential make binary (or empty)
# $2: the description on how we found this
AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
[
MAKE_CANDIDATE="$1"
DESCRIPTION="$2"
if test "x$MAKE_CANDIDATE" != x; then
AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
if test "x$IS_GNU_MAKE" = x; then
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
else
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[[12346789]]'`
if test "x$IS_MODERN_MAKE" = x; then
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
else
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
MAKE_EXPECTED_ENV='msys'
else
AC_MSG_ERROR([Unknown Windows environment])
fi
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
else
# Not relevant for non-Windows
IS_MAKE_CORRECT_ENV=true
fi
if test "x$IS_MAKE_CORRECT_ENV" = x; then
AC_MSG_NOTICE([Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring.])
else
FOUND_MAKE=$MAKE_CANDIDATE
BASIC_FIXUP_EXECUTABLE(FOUND_MAKE)
fi
fi
fi
fi
])
# Goes looking for a usable version of GNU make.
AC_DEFUN([BASIC_CHECK_GNU_MAKE],
[
# We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
if test "x$MAKE" != x; then
# User has supplied a make, test it.
if test ! -f "$MAKE"; then
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
fi
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
if test "x$FOUND_MAKE" = x; then
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer.])
fi
else
# Try our hardest to locate a correct version of GNU make
AC_PATH_PROGS(CHECK_GMAKE, gmake)
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
if test "x$FOUND_MAKE" = x; then
AC_PATH_PROGS(CHECK_MAKE, make)
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
fi
if test "x$FOUND_MAKE" = x; then
if test "x$TOOLS_DIR" != x; then
# We have a tools-dir, check that as well before giving up.
OLD_PATH=$PATH
PATH=$TOOLS_DIR:$PATH
AC_PATH_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
if test "x$FOUND_MAKE" = x; then
AC_PATH_PROGS(CHECK_TOOLSDIR_MAKE, make)
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir])
fi
PATH=$OLD_PATH
fi
fi
if test "x$FOUND_MAKE" = x; then
AC_MSG_ERROR([Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
fi
fi
MAKE=$FOUND_MAKE
AC_SUBST(MAKE)
AC_MSG_NOTICE([Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
])
AC_DEFUN([BASIC_CHECK_FIND_DELETE], AC_DEFUN([BASIC_CHECK_FIND_DELETE],
[ [
# Test if find supports -delete # Test if find supports -delete
AC_MSG_CHECKING([if find supports -delete]) AC_MSG_CHECKING([if find supports -delete])
FIND_DELETE="-delete" FIND_DELETE="-delete"
DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?) DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
@@ -281,104 +540,22 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
fi fi
rmdir $DELETEDIR rmdir $DELETEDIR
AC_SUBST(FIND_DELETE)
]) ])
AC_DEFUN([CHECK_NONEMPTY], AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
[ [
# Test that variable $1 is not empty. BASIC_CHECK_GNU_MAKE
if test "" = "[$]$1"; then AC_MSG_ERROR(Could not find translit($1,A-Z,a-z) !); fi
])
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
[
# Start with tools that do not need have cross compilation support
# and can be expected to be found in the default PATH. These tools are
# used by configure. Nor are these tools expected to be found in the
# devkit from the builddeps server either, since they are
# needed to download the devkit.
AC_PROG_AWK
CHECK_NONEMPTY(AWK)
AC_PATH_PROG(CAT, cat)
CHECK_NONEMPTY(CAT)
AC_PATH_PROG(CHMOD, chmod)
CHECK_NONEMPTY(CHMOD)
AC_PATH_PROG(CP, cp)
CHECK_NONEMPTY(CP)
AC_PATH_PROG(CPIO, cpio)
CHECK_NONEMPTY(CPIO)
AC_PATH_PROG(CUT, cut)
CHECK_NONEMPTY(CUT)
AC_PATH_PROG(DATE, date)
CHECK_NONEMPTY(DATE)
AC_PATH_PROG(DF, df)
CHECK_NONEMPTY(DF)
AC_PATH_PROG(DIFF, diff)
CHECK_NONEMPTY(DIFF)
# Warning echo is really, really unportable!!!!! Different
# behaviour in bash and dash and in a lot of other shells!
# Use printf for serious work!
AC_PATH_PROG(ECHO, echo)
CHECK_NONEMPTY(ECHO)
AC_PROG_EGREP
CHECK_NONEMPTY(EGREP)
AC_PROG_FGREP
CHECK_NONEMPTY(FGREP)
AC_PATH_PROG(FIND, find)
CHECK_NONEMPTY(FIND)
BASIC_CHECK_FIND_DELETE BASIC_CHECK_FIND_DELETE
AC_SUBST(FIND_DELETE)
AC_PROG_GREP # These tools might not be installed by default,
CHECK_NONEMPTY(GREP) # need hint on how to install them.
AC_PATH_PROG(HEAD, head) BASIC_REQUIRE_PROG(UNZIP, unzip)
CHECK_NONEMPTY(HEAD) BASIC_REQUIRE_PROG(ZIP, zip)
AC_PATH_PROG(LN, ln)
CHECK_NONEMPTY(LN) # Non-required basic tools
AC_PATH_PROG(LS, ls)
CHECK_NONEMPTY(LS)
AC_PATH_PROGS(MAKE, [gmake make])
CHECK_NONEMPTY(MAKE)
MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'`
if test "x$MAKE_VERSION" = x; then
AC_MSG_ERROR([You must use GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
fi
AC_PATH_PROG(MKDIR, mkdir)
CHECK_NONEMPTY(MKDIR)
AC_PATH_PROG(MV, mv)
CHECK_NONEMPTY(MV)
AC_PATH_PROGS(NAWK, [nawk gawk awk])
CHECK_NONEMPTY(NAWK)
AC_PATH_PROG(PRINTF, printf)
CHECK_NONEMPTY(PRINTF)
AC_PATH_PROG(THEPWDCMD, pwd)
AC_PATH_PROG(RM, rm)
CHECK_NONEMPTY(RM)
RM="$RM -f"
AC_PROG_SED
CHECK_NONEMPTY(SED)
AC_PATH_PROG(SH, sh)
CHECK_NONEMPTY(SH)
AC_PATH_PROG(SORT, sort)
CHECK_NONEMPTY(SORT)
AC_PATH_PROG(TAR, tar)
CHECK_NONEMPTY(TAR)
AC_PATH_PROG(TAIL, tail)
CHECK_NONEMPTY(TAIL)
AC_PATH_PROG(TEE, tee)
CHECK_NONEMPTY(TEE)
AC_PATH_PROG(TR, tr)
CHECK_NONEMPTY(TR)
AC_PATH_PROG(TOUCH, touch)
CHECK_NONEMPTY(TOUCH)
AC_PATH_PROG(WC, wc)
CHECK_NONEMPTY(WC)
AC_PATH_PROG(XARGS, xargs)
CHECK_NONEMPTY(XARGS)
AC_PATH_PROG(ZIP, zip)
CHECK_NONEMPTY(ZIP)
AC_PATH_PROG(UNZIP, unzip)
CHECK_NONEMPTY(UNZIP)
AC_PATH_PROG(LDD, ldd) AC_PATH_PROG(LDD, ldd)
if test "x$LDD" = "x"; then if test "x$LDD" = "x"; then
# List shared lib dependencies is used for # List shared lib dependencies is used for
@@ -390,56 +567,18 @@ AC_PATH_PROG(OTOOL, otool)
if test "x$OTOOL" = "x"; then if test "x$OTOOL" = "x"; then
OTOOL="true" OTOOL="true"
fi fi
AC_PATH_PROG(READELF, readelf) AC_PATH_PROGS(READELF, [readelf greadelf])
AC_PATH_PROG(EXPR, expr)
CHECK_NONEMPTY(EXPR)
AC_PATH_PROG(FILE, file)
CHECK_NONEMPTY(FILE)
AC_PATH_PROG(HG, hg) AC_PATH_PROG(HG, hg)
]) AC_PATH_PROG(STAT, stat)
AC_PATH_PROG(TIME, time)
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
BASIC_REQUIRE_PROG(COMM, comm)
AC_DEFUN_ONCE([BASIC_COMPILE_UNCYGDRIVE],
[
# When using cygwin, we need a wrapper binary that renames
# /cygdrive/c/ arguments into c:/ arguments and peeks into
# @files and rewrites these too! This wrapper binary is
# called uncygdrive.exe.
UNCYGDRIVE=
if test "x$OPENJDK_BUILD_OS" = xwindows; then
AC_MSG_CHECKING([if uncygdrive can be created])
UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c`
rm -f $OUTPUT_ROOT/uncygdrive*
UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe`
cd $OUTPUT_ROOT
$CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1
cd $CURDIR
if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then
AC_MSG_RESULT([no])
cat $OUTPUT_ROOT/uncygdrive1.log
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/uncygdrive.exe])
fi
AC_MSG_RESULT([$UNCYGDRIVE])
AC_MSG_CHECKING([if uncygdrive.exe works])
cd $OUTPUT_ROOT
$UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1
cd $CURDIR
if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then
AC_MSG_RESULT([no])
cat $OUTPUT_ROOT/uncygdrive2.log
AC_MSG_ERROR([Uncygdrive did not work!])
fi
AC_MSG_RESULT([yes])
rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj
fi fi
AC_SUBST(UNCYGDRIVE)
]) ])
# Check if build directory is on local disk. If not possible to determine,
# Check if build directory is on local disk. # we prefer to claim it's local.
# Argument 1: directory to test # Argument 1: directory to test
# Argument 2: what to do if it is on local disk # Argument 2: what to do if it is on local disk
# Argument 3: what to do otherwise (remote disk or failure) # Argument 3: what to do otherwise (remote disk or failure)
@@ -447,11 +586,26 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
[ [
# df -l lists only local disks; if the given directory is not found then # df -l lists only local disks; if the given directory is not found then
# a non-zero exit code is given # a non-zero exit code is given
if $DF -l $1 > /dev/null 2>&1; then if test "x$DF" = x; then
$2 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
else # msys does not have df; use Windows "net use" instead.
$3 IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
fi if test "x$IS_NETWORK_DISK" = x; then
$2
else
$3
fi
else
# No df here, say it's local
$2
fi
else
if $DF -l $1 > /dev/null 2>&1; then
$2
else
$3
fi
fi
]) ])
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],

View File

@@ -0,0 +1,406 @@
#
# Copyright (c) 2011, 2012, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
[
windows_path="[$]$1"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
$1="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
$1="$unix_path"
fi
])
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
[
unix_path="[$]$1"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
windows_path=`$CYGPATH -m "$unix_path"`
$1="$windows_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
windows_path=`cmd //c echo $unix_path`
$1="$windows_path"
fi
])
# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
[
input_path="$1"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-._/a-zA-Z0-9@:>@`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-stile (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $1 | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
])
# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],
[
input_path="$1"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-_/:a-zA-Z0-9@:>@`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
])
# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
# and could probably be heavily simplified. However, all changes in this
# area tend to need lot of testing in different scenarios, and in lack of
# proper unit testing, cleaning this up has not been deemed worth the effort
# at the moment.
AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
[
# Input might be given as Windows format, start by converting to
# unix format.
path="[$]$1"
new_path=`$CYGPATH -u "$path"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
fi
])
AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
[
path="[$]$1"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path`
fi
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
])
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
[
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath])
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
])
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
[
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
# Output is in $new_path
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
fi
])
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
[
SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
if test $SRC_ROOT_LENGTH -gt 100; then
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
fi
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
AC_MSG_CHECKING([cygwin release])
CYGWIN_VERSION=`$UNAME -r`
AC_MSG_RESULT([$CYGWIN_VERSION])
WINDOWS_ENV_VENDOR='cygwin'
WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
if test "x$CYGWIN_VERSION_OK" = x; then
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
AC_MSG_ERROR([Cannot continue])
fi
if test "x$CYGPATH" = x; then
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
fi
AC_MSG_CHECKING([cygwin root directory as unix-style path])
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
AC_MSG_CHECKING([msys release])
MSYS_VERSION=`$UNAME -r`
AC_MSG_RESULT([$MSYS_VERSION])
WINDOWS_ENV_VENDOR='msys'
WINDOWS_ENV_VERSION="$MSYS_VERSION"
AC_MSG_CHECKING([msys root directory as unix-style path])
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
AC_MSG_RESULT([$MSYS_ROOT_PATH])
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
else
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys was detected.])
fi
# Test if windows or unix (cygwin/msys) find is first in path.
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
FIND_BINARY_OUTPUT=`find --version 2>&1`
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
AC_MSG_RESULT([unix style])
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
AC_MSG_RESULT([Windows])
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
AC_MSG_ERROR([Cannot continue])
else
AC_MSG_RESULT([unknown])
AC_MSG_WARN([It seems that your find utility is non-standard.])
fi
])
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
[
# When using cygwin or msys, we need a wrapper binary that renames
# /cygdrive/c/ arguments into c:/ arguments and peeks into
# @files and rewrites these too! This wrapper binary is
# called fixpath.
FIXPATH=
if test "x$OPENJDK_BUILD_OS" = xwindows; then
AC_MSG_CHECKING([if fixpath can be created])
FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
# Important to keep the .exe suffix on Cygwin for Hotspot makefiles
FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
# Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
# @ was chosen as separator to minimize risk of other tools messing around with it
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
fi
rm -f $OUTPUT_ROOT/fixpath*
cd $OUTPUT_ROOT
$CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
cd $CURDIR
if test ! -x $OUTPUT_ROOT/fixpath.exe; then
AC_MSG_RESULT([no])
cat $OUTPUT_ROOT/fixpath1.log
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
fi
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if fixpath.exe works])
cd $OUTPUT_ROOT
$FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
cd $CURDIR
if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
AC_MSG_RESULT([no])
cat $OUTPUT_ROOT/fixpath2.log
AC_MSG_ERROR([fixpath did not work!])
fi
AC_MSG_RESULT([yes])
rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
fi
AC_SUBST(FIXPATH)
])

View File

@@ -23,22 +23,192 @@
# questions. # questions.
# #
# Fixes paths on windows to be mixed mode short. # Execute the check given as argument, and verify the result
AC_DEFUN([BOOTJDK_WIN_FIX_PATH], # If the Boot JDK was previously found, do nothing
# $1 A command line (typically autoconf macro) to execute
AC_DEFUN([BOOTJDK_DO_CHECK],
[ [
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then if test "x$BOOT_JDK_FOUND" = xno; then
AC_PATH_PROG(CYGPATH, cygpath) # Now execute the test
tmp="[$]$1" $1
# Convert to C:/ mixed style path without spaces.
tmp=`$CYGPATH -s -m "$tmp"` # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
$1="$tmp" if test "x$BOOT_JDK_FOUND" = xmaybe; then
# Do we have a bin/java?
if test ! -x "$BOOT_JDK/bin/java"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring])
BOOT_JDK_FOUND=no
else
# Do we have a bin/javac?
if test ! -x "$BOOT_JDK/bin/javac"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
BOOT_JDK_FOUND=no
else
# Do we have an rt.jar? (On MacOSX it is called classes.jar)
if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring])
BOOT_JDK_FOUND=no
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
if test "x$FOUND_VERSION_78" = x; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
AC_MSG_NOTICE([(Your Boot JDK must be version 7 or 8)])
BOOT_JDK_FOUND=no
else
# We're done! :-)
BOOT_JDK_FOUND=yes
BASIC_FIXUP_PATH(BOOT_JDK)
AC_MSG_CHECKING([for Boot JDK])
AC_MSG_RESULT([$BOOT_JDK])
AC_MSG_CHECKING([Boot JDK version])
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
AC_MSG_RESULT([$BOOT_JDK_VERSION])
fi # end check jdk version
fi # end check rt.jar
fi # end check javac
fi # end check java
fi # end check boot jdk found
fi
])
# Test: Is bootjdk explicitely set by command line arguments?
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
[
if test "x$with_boot_jdk" != x; then
BOOT_JDK=$with_boot_jdk
BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
fi
])
# Test: Is bootjdk available from builddeps?
AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS],
[
BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no])
])
# Test: Is $JAVA_HOME set?
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
[
if test "x$JAVA_HOME" != x; then
JAVA_HOME_PROCESSED="$JAVA_HOME"
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
if test ! -d "$JAVA_HOME_PROCESSED"; then
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
else
# Aha, the user has set a JAVA_HOME
# let us use that as the Boot JDK.
BOOT_JDK="$JAVA_HOME_PROCESSED"
BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
fi
fi fi
]) ])
AC_DEFUN([BOOTJDK_MISSING_ERROR], # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
[ [
AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk]) AC_PATH_PROG(JAVAC_CHECK, javac)
AC_MSG_ERROR([Cannot continue]) AC_PATH_PROG(JAVA_CHECK, java)
BINARY="$JAVAC_CHECK"
if test "x$JAVAC_CHECK" = x; then
BINARY="$JAVA_CHECK"
fi
if test "x$BINARY" != x; then
# So there is a java(c) binary, it might be part of a JDK.
# Lets find the JDK/JRE directory by following symbolic links.
# Linux/GNU systems often have links from /usr/bin/java to
# /etc/alternatives/java to the real JDK binary.
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
BOOT_JDK=`dirname "$BINARY"`
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
# Looks like we found ourselves an JDK
BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
fi
fi
])
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME],
[
if test -x /usr/libexec/java_home; then
BOOT_JDK=`/usr/libexec/java_home`
BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
fi
])
# Look for a jdk in the given path. If there are multiple, try to select the newest.
# If found, set BOOT_JDK and BOOT_JDK_FOUND.
# $1 = Path to directory containing jdk installations.
# $2 = String to append to the found JDK directory to get the proper JDK home
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY],
[
BOOT_JDK_PREFIX="$1"
BOOT_JDK_SUFFIX="$2"
ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
if test "x$ALL_JDKS_FOUND" != x; then
for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
BOOTJDK_DO_CHECK([
BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
if test -d "$BOOT_JDK"; then
BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)])
fi
])
done
fi
])
# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
# environmental variable as base for where to look.
# $1 Name of an environmal variable, assumed to point to the Program Files directory.
AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
[
if test "x[$]$1" != x; then
VIRTUAL_DIR="[$]$1/Java"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
fi
])
# Test: Is there a JDK installed in default, well-known locations?
AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
[
if test "x$OPENJDK_TARGET_OS" = xwindows; then
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramW6432])])
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMW6432])])
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([PROGRAMFILES])])
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY([ProgramFiles])])
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/cygdrive/c/Program Files/Java])])
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/Library/Java/JavaVirtualMachines],[/Contents/Home])])
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/System/Library/Java/JavaVirtualMachines],[/Contents/Home])])
elif test "x$OPENJDK_TARGET_OS" = xlinux; then
BOOTJDK_DO_CHECK([BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY([/usr/lib/jvm])])
fi
])
# Check that a command-line tool in the Boot JDK is correct
# $1 = name of variable to assign
# $2 = name of binary
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
[
AC_MSG_CHECKING([for $2 in Boot JDK])
$1=$BOOT_JDK/bin/$2
if test ! -x [$]$1; then
AC_MSG_RESULT(not found)
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk])
AC_MSG_ERROR([Could not find $2 in the Boot JDK])
fi
AC_MSG_RESULT(ok)
]) ])
############################################################################### ###############################################################################
@@ -51,204 +221,74 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
BOOT_JDK_FOUND=no BOOT_JDK_FOUND=no
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk], AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])]) [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
if test "x$with_boot_jdk" != x; then # We look for the Boot JDK through various means, going from more certain to
BOOT_JDK=$with_boot_jdk # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
BOOT_JDK_FOUND=yes # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
# must check if this is indeed valid; otherwise we'll continue looking.
# Test: Is bootjdk explicitely set by command line arguments?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
# Having specified an argument which is incorrect will produce an instant failure;
# we should not go on looking
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
fi fi
# Test: Is bootjdk available from builddeps?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
# Test: Is $JAVA_HOME set?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME])
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
# Test: Is there a JDK installed in default, well-known locations?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS])
# If we haven't found anything yet, we've truly lost. Give up.
if test "x$BOOT_JDK_FOUND" = xno; then if test "x$BOOT_JDK_FOUND" = xno; then
BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no]) HELP_MSG_MISSING_DEPENDENCY([openjdk])
AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG])
AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
AC_MSG_ERROR([Cannot continue])
fi fi
if test "x$BOOT_JDK_FOUND" = xno; then # Setup proper paths for what we found
if test "x$JAVA_HOME" != x; then
if test ! -d "$JAVA_HOME"; then
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
BOOTJDK_MISSING_ERROR
fi
# Aha, the user has set a JAVA_HOME
# let us use that as the Boot JDK.
BOOT_JDK="$JAVA_HOME"
BOOT_JDK_FOUND=yes
# To be on the safe side, lets check that it is a JDK.
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
JAVAC="$BOOT_JDK/bin/javac"
JAVA="$BOOT_JDK/bin/java"
BOOT_JDK_FOUND=yes
else
AC_MSG_NOTICE([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME])
BOOTJDK_MISSING_ERROR
fi
fi
fi
if test "x$BOOT_JDK_FOUND" = xno; then
AC_PATH_PROG(JAVAC_CHECK, javac)
AC_PATH_PROG(JAVA_CHECK, java)
BINARY="$JAVAC_CHECK"
if test "x$JAVAC_CHECK" = x; then
BINARY="$JAVA_CHECK"
fi
if test "x$BINARY" != x; then
# So there is a java(c) binary, it might be part of a JDK.
# Lets find the JDK/JRE directory by following symbolic links.
# Linux/GNU systems often have links from /usr/bin/java to
# /etc/alternatives/java to the real JDK binary.
WHICHCMD_SPACESAFE(BINARY,[path to javac])
REMOVE_SYMBOLIC_LINKS(BINARY)
BOOT_JDK=`dirname $BINARY`
BOOT_JDK=`cd $BOOT_JDK/..; pwd`
if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
JAVAC=$BOOT_JDK/bin/javac
JAVA=$BOOT_JDK/bin/java
BOOT_JDK_FOUND=yes
fi
fi
fi
if test "x$BOOT_JDK_FOUND" = xno; then
# Try the MacOSX way.
if test -x /usr/libexec/java_home; then
BOOT_JDK=`/usr/libexec/java_home`
if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then
JAVAC=$BOOT_JDK/bin/javac
JAVA=$BOOT_JDK/bin/java
BOOT_JDK_FOUND=yes
fi
fi
fi
if test "x$BOOT_JDK_FOUND" = xno; then
AC_PATH_PROG(JAVA_CHECK, java)
if test "x$JAVA_CHECK" != x; then
# There is a java in the path. But apparently we have not found a javac
# in the path, since that would have been tested earlier.
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# Now if this is a windows platform. The default installation of a JDK
# actually puts the JRE in the path and keeps the JDK out of the path!
# Go look in the default installation location.
BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1`
if test -d "$BOOT_JDK"; then
BOOT_JDK_FOUND=yes
fi
fi
if test "x$BOOT_JDK_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([openjdk])
AC_MSG_NOTICE([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG])
BOOTJDK_MISSING_ERROR
fi
else
HELP_MSG_MISSING_DEPENDENCY([openjdk])
AC_MSG_NOTICE([Could not find a JDK. $HELP_MSG])
BOOTJDK_MISSING_ERROR
fi
fi
BOOTJDK_WIN_FIX_PATH(BOOT_JDK)
# Now see if we can find the rt.jar, or its nearest equivalent.
BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)]) if test ! -f "$BOOT_RTJAR"; then
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)])
if test ! -f $BOOT_RTJAR; then
# On MacOSX it is called classes.jar # On MacOSX it is called classes.jar
BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
if test ! -f $BOOT_RTJAR; then if test -f "$BOOT_RTJAR"; then
AC_MSG_NOTICE([Cannot find the rt.jar or its equivalent!]) # Remove the ..
AC_MSG_NOTICE([This typically means that configure failed to automatically find a suitable Boot JDK]) BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
BOOTJDK_MISSING_ERROR
fi fi
# Remove the ..
BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
# The tools.jar is part of classes.jar
BOOT_TOOLSJAR="$BOOT_RTJAR"
fi fi
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
AC_SUBST(BOOT_JDK) BOOT_JDK="$BOOT_JDK"
AC_SUBST(BOOT_RTJAR) AC_SUBST(BOOT_RTJAR)
AC_SUBST(BOOT_TOOLSJAR) AC_SUBST(BOOT_TOOLSJAR)
AC_MSG_CHECKING([for Boot JDK]) AC_SUBST(BOOT_JDK)
AC_MSG_RESULT([$BOOT_JDK])
AC_MSG_CHECKING([for Boot rt.jar])
AC_MSG_RESULT([$BOOT_RTJAR])
AC_MSG_CHECKING([for Boot tools.jar])
AC_MSG_RESULT([$BOOT_TOOLSJAR])
# Use the java tool from the Boot JDK. # Setup tools from the Boot JDK.
AC_MSG_CHECKING([for java in Boot JDK]) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
JAVA=$BOOT_JDK/bin/java BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
if test ! -x $JAVA; then BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
AC_MSG_NOTICE([Could not find a working java]) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
BOOTJDK_MISSING_ERROR BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
fi BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1` BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
AC_MSG_RESULT([yes $BOOT_JDK_VERSION])
AC_SUBST(JAVA)
# Extra M4 quote needed to protect [] in grep expression. # Finally, set some other options...
[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
if test "x$FOUND_VERSION_78" = x; then
HELP_MSG_MISSING_DEPENDENCY([openjdk])
AC_MSG_NOTICE([Your boot-jdk must be version 7 or 8. $HELP_MSG])
BOOTJDK_MISSING_ERROR
fi
# When compiling code to be executed by the Boot JDK, force jdk7 compatibility. # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
BOOT_JDK_SOURCETARGET="-source 7 -target 7" BOOT_JDK_SOURCETARGET="-source 7 -target 7"
AC_SUBST(BOOT_JDK_SOURCETARGET) AC_SUBST(BOOT_JDK_SOURCETARGET)
# Use the javac tool from the Boot JDK.
AC_MSG_CHECKING([for javac in Boot JDK])
JAVAC=$BOOT_JDK/bin/javac
if test ! -x $JAVAC; then
AC_MSG_ERROR([Could not find a working javac])
fi
AC_MSG_RESULT(yes)
AC_SUBST(JAVAC)
AC_SUBST(JAVAC_FLAGS) AC_SUBST(JAVAC_FLAGS)
# Use the javah tool from the Boot JDK.
AC_MSG_CHECKING([for javah in Boot JDK])
JAVAH=$BOOT_JDK/bin/javah
if test ! -x $JAVAH; then
AC_MSG_NOTICE([Could not find a working javah])
BOOTJDK_MISSING_ERROR
fi
AC_MSG_RESULT(yes)
AC_SUBST(JAVAH)
# Use the jar tool from the Boot JDK.
AC_MSG_CHECKING([for jar in Boot JDK])
JAR=$BOOT_JDK/bin/jar
if test ! -x $JAR; then
AC_MSG_NOTICE([Could not find a working jar])
BOOTJDK_MISSING_ERROR
fi
AC_SUBST(JAR)
AC_MSG_RESULT(yes)
# Use the rmic tool from the Boot JDK.
AC_MSG_CHECKING([for rmic in Boot JDK])
RMIC=$BOOT_JDK/bin/rmic
if test ! -x $RMIC; then
AC_MSG_NOTICE([Could not find a working rmic])
BOOTJDK_MISSING_ERROR
fi
AC_SUBST(RMIC)
AC_MSG_RESULT(yes)
# Use the native2ascii tool from the Boot JDK.
AC_MSG_CHECKING([for native2ascii in Boot JDK])
NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
if test ! -x $NATIVE2ASCII; then
AC_MSG_NOTICE([Could not find a working native2ascii])
BOOTJDK_MISSING_ERROR
fi
AC_MSG_RESULT(yes)
AC_SUBST(NATIVE2ASCII)
]) ])
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],

View File

@@ -0,0 +1,43 @@
#
# Copyright (c) 2011, 2012, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
# Support for building boot cycle builds
# First include the real base spec.gmk file
include @SPEC@
# Check that the user did not try to specify a different java to use for compiling.
ifneq ($(firstword $(SJAVAC_SERVER_JAVA)),$(firstword $(JAVA)))
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
endif
# Override specific values to do a boot cycle build
# The bootcycle build has a different output directory
BUILD_OUTPUT:=@BUILD_OUTPUT@/bootcycle-build
# Use a different Boot JDK
BOOT_JDK:=@BUILD_OUTPUT@/images/j2sdk-image
BOOT_RTJAR:=@BUILD_OUTPUT@/images/j2sdk-image/jre/lib/rt.jar

View File

@@ -22,17 +22,42 @@
# questions. # questions.
# #
# This is a wrapper for the config.guess from autoconf. The latter does not properly # This is a wrapper for the config.guess from autoconf. The latter does not
# detect amd64 systems, since that require isainfo instead of uname. Instead of patching # properly detect 64 bit systems on all platforms. Instead of patching the
# the autoconf system (which might easily get lost in a future update), we wrap it and # autoconf system (which might easily get lost in a future update), we wrap it
# fix the broken property, if needed. # and fix the broken property, if needed.
DIR=`dirname $0` DIR=`dirname $0`
OUT=`. $DIR/autoconf-config.guess` OUT=`. $DIR/autoconf-config.guess`
# Test and fix solaris on x86_64
echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
if test $? = 0; then if test $? = 0; then
# isainfo -n returns either i386 or amd64 on Intel systems # isainfo -n returns either i386 or amd64
REAL_CPU=`isainfo -n` REAL_CPU=`isainfo -n`
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
fi fi
# Test and fix solaris on sparcv9
echo $OUT | grep sparc-sun-solaris > /dev/null 2> /dev/null
if test $? = 0; then
# isainfo -n returns either sparc or sparcv9
REAL_CPU=`isainfo -n`
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
fi
# Test and fix cygwin on x86_64
echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
if test $? != 0; then
echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null
fi
if test $? = 0; then
case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in
intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
REAL_CPU=x86_64
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
;;
esac
fi
echo $OUT echo $OUT

View File

@@ -30,25 +30,21 @@ AC_DEFUN([BPERF_CHECK_CORES],
FOUND_CORES=no FOUND_CORES=no
if test -f /proc/cpuinfo; then if test -f /proc/cpuinfo; then
# Looks like a Linux system # Looks like a Linux (or cygwin) system
NUM_CORES=`cat /proc/cpuinfo | grep -c processor` NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
FOUND_CORES=yes FOUND_CORES=yes
fi elif test -x /usr/sbin/psrinfo; then
if test -x /usr/sbin/psrinfo; then
# Looks like a Solaris system # Looks like a Solaris system
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line` NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
FOUND_CORES=yes FOUND_CORES=yes
fi elif test -x /usr/sbin/system_profiler; then
if test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system # Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'` NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
FOUND_CORES=yes FOUND_CORES=yes
fi elif test -n "$NUMBER_OF_PROCESSORS"; then
# On windows, look in the env
if test "x$build_os" = xwindows; then NUM_CORES=$NUMBER_OF_PROCESSORS
NUM_CORES=4 FOUND_CORES=yes
fi fi
# For c/c++ code we run twice as many concurrent build # For c/c++ code we run twice as many concurrent build
@@ -58,7 +54,8 @@ AC_DEFUN([BPERF_CHECK_CORES],
if test "x$FOUND_CORES" = xyes; then if test "x$FOUND_CORES" = xyes; then
AC_MSG_RESULT([$NUM_CORES]) AC_MSG_RESULT([$NUM_CORES])
else else
AC_MSG_RESULT([could not detect number of cores, defaulting to 1!]) AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
AC_MSG_WARN([This will disable all parallelism from build!])
fi fi
]) ])
@@ -66,39 +63,36 @@ AC_DEFUN([BPERF_CHECK_CORES],
AC_DEFUN([BPERF_CHECK_MEMORY_SIZE], AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
[ [
AC_MSG_CHECKING([for memory size]) AC_MSG_CHECKING([for memory size])
# Default to 1024MB # Default to 1024 MB
MEMORY_SIZE=1024 MEMORY_SIZE=1024
FOUND_MEM=no FOUND_MEM=no
if test -f /proc/cpuinfo; then if test -f /proc/meminfo; then
# Looks like a Linux system # Looks like a Linux (or cygwin) system
MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'` MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024` MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
FOUND_MEM=yes FOUND_MEM=yes
fi elif test -x /usr/sbin/prtconf; then
if test -x /usr/sbin/prtconf; then
# Looks like a Solaris system # Looks like a Solaris system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'` MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
FOUND_MEM=yes FOUND_MEM=yes
fi elif test -x /usr/sbin/system_profiler; then
if test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system # Looks like a MacOSX system
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'` MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024` MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
FOUND_MEM=yes FOUND_MEM=yes
fi elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
if test "x$build_os" = xwindows; then MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'` MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes FOUND_MEM=yes
fi fi
if test "x$FOUND_MEM" = xyes; then if test "x$FOUND_MEM" = xyes; then
AC_MSG_RESULT([$MEMORY_SIZE MB]) AC_MSG_RESULT([$MEMORY_SIZE MB])
else else
AC_MSG_RESULT([could not detect memory size defaulting to 1024MB!]) AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
AC_MSG_WARN([This might seriously impact build performance!])
fi fi
]) ])
@@ -136,7 +130,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
[ [
AC_ARG_ENABLE([ccache], AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--disable-ccache], [AS_HELP_STRING([--disable-ccache],
[use ccache to speed up recompilations @<:@enabled@:>@])], [disable using ccache to speed up recompilations @<:@enabled@:>@])],
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes]) [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
if test "x$ENABLE_CCACHE" = xyes; then if test "x$ENABLE_CCACHE" = xyes; then
AC_PATH_PROG(CCACHE, ccache) AC_PATH_PROG(CCACHE, ccache)
@@ -209,7 +203,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
# Can the C/C++ compiler use precompiled headers? # Can the C/C++ compiler use precompiled headers?
# #
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers], AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
[use precompiled headers when compiling C++ @<:@enabled@:>@])], [disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
[ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes]) [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes])
USE_PRECOMPILED_HEADER=1 USE_PRECOMPILED_HEADER=1
@@ -240,46 +234,29 @@ AC_SUBST(USE_PRECOMPILED_HEADER)
AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC], AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
[ [
AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java], AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
[use this java binary for running the javac background server and other long running java tasks in the build process, [use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
e.g. ---with-server-java="/opt/jrockit/bin/java -server"])])
if test "x$with_server_java" != x; then if test "x$with_sjavac_server_java" != x; then
SERVER_JAVA="$with_server_java" SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""` FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
if test "x$FOUND_VERSION" = x; then if test "x$FOUND_VERSION" = x; then
AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA]) AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
fi fi
else else
SERVER_JAVA="" SJAVAC_SERVER_JAVA=""
# Hotspot specific options. # Hotspot specific options.
ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA]) ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA])
# JRockit specific options. # JRockit specific options.
ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
SERVER_JAVA="$JAVA $SERVER_JAVA" SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
fi fi
AC_SUBST(SERVER_JAVA) AC_SUBST(SJAVAC_SERVER_JAVA)
AC_MSG_CHECKING([whether to use shared server for javac]) AC_ARG_WITH(sjavac-server-cores, [AS_HELP_STRING([--with-sjavac-server-cores],
AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server], [use at most this number of concurrent threads on the sjavac server @<:@probed@:>@])])
[enable the shared javac server during the build process @<:@disabled@:>@])], if test "x$with_sjavac_server_cores" != x; then
[ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no']) SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
if test "x$ENABLE_JAVAC_SERVER" = xyes; then
JAVAC_USE_REMOTE=true
JAVAC_SERVERS="$OUTPUT_ROOT/javacservers"
else
JAVAC_USE_REMOTE=false
JAVAC_SERVERS=
fi
AC_SUBST(JAVAC_USE_REMOTE)
AC_SUBST(JAVAC_SERVERS)
AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores],
[use at most this number of concurrent threads on the javac server @<:@probed@:>@])])
if test "x$with_javac_server_cores" != x; then
JAVAC_SERVER_CORES="$with_javac_server_cores"
else else
if test "$NUM_CORES" -gt 16; then if test "$NUM_CORES" -gt 16; then
# We set this arbitrary limit because we want to limit the heap # We set this arbitrary limit because we want to limit the heap
@@ -287,86 +264,49 @@ else
# In the future we will make the javac compilers in the server # In the future we will make the javac compilers in the server
# share more and more state, thus enabling us to use more and # share more and more state, thus enabling us to use more and
# more concurrent threads in the server. # more concurrent threads in the server.
JAVAC_SERVER_CORES="16" SJAVAC_SERVER_CORES="16"
else else
JAVAC_SERVER_CORES="$NUM_CORES" SJAVAC_SERVER_CORES="$NUM_CORES"
fi fi
if test "$MEMORY_SIZE" -gt "17000"; then if test "$MEMORY_SIZE" -gt "17000"; then
MAX_HEAP_MEM=10000 MAX_HEAP_MEM=10000
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "10000"; then elif test "$MEMORY_SIZE" -gt "10000"; then
MAX_HEAP_MEM=6000 MAX_HEAP_MEM=6000
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "5000"; then elif test "$MEMORY_SIZE" -gt "5000"; then
MAX_HEAP_MEM=3000 MAX_HEAP_MEM=3000
ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "3800"; then elif test "$MEMORY_SIZE" -gt "3800"; then
MAX_HEAP_MEM=2500 MAX_HEAP_MEM=2500
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "1900"; then elif test "$MEMORY_SIZE" -gt "1900"; then
MAX_HEAP_MEM=1200 MAX_HEAP_MEM=1200
ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1400M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "1000"; then elif test "$MEMORY_SIZE" -gt "1000"; then
MAX_HEAP_MEM=900 MAX_HEAP_MEM=900
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
else else
MAX_HEAP_MEM=512 MAX_HEAP_MEM=512
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA])
fi fi
ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501` MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
AC_MSG_CHECKING([if number of server cores must be reduced]) AC_MSG_CHECKING([if number of server cores must be reduced])
JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP" SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB]) AC_MSG_RESULT([yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
fi fi
fi fi
AC_SUBST(JAVAC_SERVER_CORES) AC_SUBST(SJAVAC_SERVER_CORES)
AC_MSG_CHECKING([whether to track dependencies between Java packages])
AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps],
[enable the dependency tracking between Java packages @<:@disabled@:>@])],
[ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no'])
AC_MSG_RESULT([$ENABLE_JAVAC_DEPS])
if test "x$ENABLE_JAVAC_DEPS" = xyes; then
JAVAC_USE_DEPS=true
else
JAVAC_USE_DEPS=false
fi
AC_SUBST(JAVAC_USE_DEPS)
AC_MSG_CHECKING([whether to use multiple cores for javac compilation])
AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core],
[compile Java packages concurrently @<:@disabled@:>@])],
[ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no'])
AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE])
if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then
JAVAC_USE_MODE=MULTI_CORE_CONCURRENT
else
JAVAC_USE_MODE=SINGLE_THREADED_BATCH
if test "x$ENABLE_JAVAC_DEPS" = xyes; then
AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.])
AC_MSG_WARN([Disabling dependency tracking for you now.])
JAVAC_USE_DEPS=false
fi
if test "x$ENABLE_JAVAC_SERVER" = xyes; then
AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.])
AC_MSG_WARN([Disabling javac server for you now.])
JAVAC_USE_REMOTE=false
fi
fi
AC_SUBST(JAVAC_USE_MODE)
AC_MSG_CHECKING([whether to use sjavac]) AC_MSG_CHECKING([whether to use sjavac])
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac], AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
@@ -375,4 +315,11 @@ AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
AC_MSG_RESULT([$ENABLE_SJAVAC]) AC_MSG_RESULT([$ENABLE_SJAVAC])
AC_SUBST(ENABLE_SJAVAC) AC_SUBST(ENABLE_SJAVAC)
if test "x$ENABLE_SJAVAC" = xyes; then
SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
else
SJAVAC_SERVER_DIR=
fi
AC_SUBST(SJAVAC_SERVER_DIR)
]) ])

View File

@@ -31,7 +31,7 @@
# Translate a configuration triplet/quadruplet into something # Translate a configuration triplet/quadruplet into something
# known by this configuration file. # known by this configuration file.
# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_SYSTEM} # If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10 REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10

View File

@@ -52,19 +52,19 @@ AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
fi fi
# Create build and target names that use _ instead of "-" and ".". # Create build and target names that use _ instead of "-" and ".".
# This is necessary to use them in variable names. # This is necessary to use them in variable names.
build_var=`echo ${OPENJDK_BUILD_SYSTEM} | tr '-' '_' | tr '.' '_'` build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
target_var=`echo ${OPENJDK_TARGET_SYSTEM} | tr '-' '_' | tr '.' '_'` target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
# Extract rewrite information for build and target # Extract rewrite information for build and target
eval rewritten_build=\${REWRITE_${build_var}} eval rewritten_build=\${REWRITE_${build_var}}
if test "x$rewritten_build" = x; then if test "x$rewritten_build" = x; then
rewritten_build=${OPENJDK_BUILD_SYSTEM} rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
echo Build stays the same $rewritten_build echo Build stays the same $rewritten_build
else else
echo Rewriting build for builddeps into $rewritten_build echo Rewriting build for builddeps into $rewritten_build
fi fi
eval rewritten_target=\${REWRITE_${target_var}} eval rewritten_target=\${REWRITE_${target_var}}
if test "x$rewritten_target" = x; then if test "x$rewritten_target" = x; then
rewritten_target=${OPENJDK_TARGET_SYSTEM} rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
echo Target stays the same $rewritten_target echo Target stays the same $rewritten_target
else else
echo Rewriting target for builddeps into $rewritten_target echo Rewriting target for builddeps into $rewritten_target
@@ -235,26 +235,13 @@ AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
[use this configuration file for the builddeps])]) [use this configuration file for the builddeps])])
AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server], AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
[download and use build dependencies from this server url, e.g. --with-builddeps-server=ftp://example.com/dir])]) [download and use build dependencies from this server url])])
AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir], AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
[store downloaded build dependencies here @<:@d/localhome/builddeps@:>@])], [store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
[], [],
[with_builddeps_dir=/localhome/builddeps]) [with_builddeps_dir=/localhome/builddeps])
AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group], AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
[chgrp the downloaded build dependencies to this group])]) [chgrp the downloaded build dependencies to this group])])
AC_ARG_ENABLE([list-builddeps], [AS_HELP_STRING([--enable-list-builddeps],
[list all build dependencies known to the configure script])],
[LIST_BUILDDEPS="${enableval}"], [LIST_BUILDDEPS='no'])
if test "x$LIST_BUILDDEPS" = xyes; then
echo
echo List of build dependencies known to the configure script,
echo that can be used in builddeps.conf files:
cat $AUTOCONF_DIR/*.ac $AUTOCONF_DIR/*.m4 | grep BDEPS_CHECK_MODUL[E]\( | cut -f 2 -d ',' | tr -d ' ' | sort
echo
exit 1
fi
]) ])

View File

@@ -26,3 +26,7 @@ PRODUCT_NAME="Java(TM)"
PRODUCT_SUFFIX="SE Runtime Environment" PRODUCT_SUFFIX="SE Runtime Environment"
JDK_RC_PLATFORM_NAME="Platform SE" JDK_RC_PLATFORM_NAME="Platform SE"
COMPANY_NAME="Oracle Corporation" COMPANY_NAME="Oracle Corporation"
# Might need better names for these
MACOSX_BUNDLE_NAME_BASE="Java SE"
MACOSX_BUNDLE_ID_BASE="com.oracle.java"

View File

@@ -0,0 +1,78 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# This script is processed by configure before it's usable. It is run from
# the root of the build directory.
##########################################################################################
# Substitutions from autoconf
LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
AWK="@AWK@"
CAT="@CAT@"
CMP="@CMP@"
CP="@CP@"
CUT="@CUT@"
DIFF="@DIFF@"
DUMPBIN="@FIXPATH@ @DUMPBIN@"
EXPR="@EXPR@"
FILE="@FILE@"
FIND="@FIND@"
GREP="@GREP@"
JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap"
LDD="@LDD@"
MKDIR="@MKDIR@"
NM="@NM@"
OBJDUMP="@OBJDUMP@"
OTOOL="@OTOOL@"
PRINTF="@PRINTF@"
READELF="@READELF@"
RM="@RM@"
SED="@SED@"
SORT="@SORT@"
STAT="@STAT@"
STRIP="@POST_STRIP_CMD@"
TEE="@TEE@"
UNIQ="@UNIQ@"
UNZIP="@UNZIP@"
SRC_ROOT="@SRC_ROOT@"
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
PATH="@VS_PATH@"
fi
# Now locate the main script and run it.
REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
exit 1
fi
. "$REAL_COMPARE_SCRIPT" "$@"

View File

@@ -1,55 +1,121 @@
#!/bin/sh #!/bin/bash
#
# Copyright (c) 2012, 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.
#
if test "x$BASH_VERSION" = x; then
echo This script needs bash to run.
echo It is recommended to use the configure script in the source tree root instead.
exit 1
fi
CONFIGURE_COMMAND_LINE="$@" CONFIGURE_COMMAND_LINE="$@"
conf_script_dir=`dirname $0` conf_script_dir=`dirname $0`
conf_closed_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
conf_custom_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
else
conf_custom_script_dir=$CUSTOM_CONFIG_DIR
fi
### ###
### Test that the generated configure is up-to-date ### Test that the generated configure is up-to-date
### ###
# On Solaris /bin/sh doesn't support test -nt but /usr/bin/test does. run_autogen_or_fail() {
TEST=`which test` if test "x`which autoconf 2> /dev/null`" = x; then
echo "Cannot locate autoconf, unable to correct situation."
print_error_not_up_to_date() { echo "Please install autoconf and run 'bash autogen.sh' to update the generated files."
echo "Error: The configure source files is newer than the generated files." echo "Error: Cannot continue" 1>&2
echo "Please run 'sh autogen.sh' to update the generated files." exit 1
else
echo "Running autogen.sh to correct the situation"
bash $conf_script_dir/autogen.sh
fi
} }
for file in configure.ac *.m4 ; do check_autoconf_timestamps() {
if $TEST $file -nt generated-configure.sh; then for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 ; do
print_error_not_up_to_date if test $file -nt $conf_script_dir/generated-configure.sh; then
exit 1 echo "Warning: The configure source files is newer than the generated files."
fi run_autogen_or_fail
done
if $TEST -e $conf_closed_script_dir/generated-configure.sh; then
# If closed source configure is available, make sure it is up-to-date as well.
for file in configure.ac *.m4 $conf_closed_script_dir/*.m4; do
if $TEST $file -nt $conf_closed_script_dir/generated-configure.sh; then
print_error_not_up_to_date
exit 1
fi fi
done done
# Test if open configure is newer than closed configure, if so, closed needs to if test -e $conf_custom_script_dir/generated-configure.sh; then
# be regenerated. # If custom source configure is available, make sure it is up-to-date as well.
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_script_dir/generated-configure.sh | cut -d" " -f 3` for file in $conf_script_dir/configure.ac $conf_script_dir/*.m4 $conf_custom_script_dir/*.m4; do
conf_closed_configure_timestamp=`grep DATE_WHEN_GENERATED: $conf_closed_script_dir/generated-configure.sh | cut -d" " -f 3` if test $file -nt $conf_custom_script_dir/generated-configure.sh; then
if $TEST $conf_open_configure_timestamp -gt $conf_closed_configure_timestamp; then echo "Warning: The configure source files is newer than the custom generated files."
print_error_not_up_to_date run_autogen_or_fail
exit 1 fi
done
fi
}
check_hg_updates() {
if test "x`which hg 2> /dev/null`" != x; then
conf_updated_autoconf_files=`cd $conf_script_dir && hg status -mard 2> /dev/null | grep autoconf`
if test "x$conf_updated_autoconf_files" != x; then
echo "Configure source code has been updated, checking time stamps"
check_autoconf_timestamps
fi
if test -e $conf_custom_script_dir; then
# If custom source configure is available, make sure it is up-to-date as well.
conf_custom_updated_autoconf_files=`cd $conf_custom_script_dir && hg status -mard 2> /dev/null | grep autoconf`
if test "x$conf_custom_updated_autoconf_files" != x; then
echo "Configure custom source code has been updated, checking time stamps"
check_autoconf_timestamps
fi
fi
fi
}
# Check for local changes
check_hg_updates
if test -e $conf_custom_script_dir/generated-configure.sh; then
# Test if open configure is newer than custom configure, if so, custom needs to
# be regenerated. This test is required to ensure consistency with custom source.
conf_open_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_script_dir/generated-configure.sh | cut -d"=" -f 2`
conf_custom_configure_timestamp=`grep DATE_WHEN_GENERATED= $conf_custom_script_dir/generated-configure.sh | cut -d"=" -f 2`
if test $conf_open_configure_timestamp -gt $conf_custom_configure_timestamp; then
echo "Warning: The generated configure file contains changes not present in the custom generated file."
run_autogen_or_fail
fi fi
fi fi
# Autoconf calls the configure script recursively sometimes.
# Don't start logging twice in that case
if test "x$conf_debug_configure" = xtrue; then
conf_debug_configure=recursive
fi
### ###
### Process command-line arguments ### Process command-line arguments
### ###
conf_processed_arguments= conf_processed_arguments=()
conf_openjdk_target= conf_openjdk_target=
conf_extra_cflags=
conf_extra_cxxflags=
for conf_option for conf_option
do do
@@ -57,14 +123,14 @@ do
--openjdk-target=*) --openjdk-target=*)
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'` conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
continue ;; continue ;;
--with-extra-cflags=*) --debug-configure)
conf_extra_cflags=`expr "X$conf_option" : '[^=]*=\(.*\)'` if test "x$conf_debug_configure" != xrecursive; then
continue ;; conf_debug_configure=true
--with-extra-cxxflags=*) export conf_debug_configure
conf_extra_cxxflags=`expr "X$conf_option" : '[^=]*=\(.*\)'` fi
continue ;; continue ;;
*) *)
conf_processed_arguments="$conf_processed_arguments $conf_option" ;; conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
esac esac
case $conf_option in case $conf_option in
@@ -74,11 +140,13 @@ do
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;; conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*) -host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;; conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-help | --help | --hel | --he | -h)
conf_print_help=true ;;
esac esac
done done
if $TEST "x$conf_legacy_crosscompile" != "x"; then if test "x$conf_legacy_crosscompile" != "x"; then
if $TEST "x$conf_openjdk_target" != "x"; then if test "x$conf_openjdk_target" != "x"; then
echo "Error: Specifying --openjdk-target together with autoconf" echo "Error: Specifying --openjdk-target together with autoconf"
echo "legacy cross-compilation flags is not supported." echo "legacy cross-compilation flags is not supported."
echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_legacy_crosscompile." echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_legacy_crosscompile."
@@ -91,31 +159,69 @@ if $TEST "x$conf_legacy_crosscompile" != "x"; then
fi fi
fi fi
if $TEST "x$conf_openjdk_target" != "x"; then if test "x$conf_openjdk_target" != "x"; then
conf_build_platform=`sh $conf_script_dir/build-aux/config.guess` conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
conf_processed_arguments="--build=$conf_build_platform --host=$conf_openjdk_target --target=$conf_openjdk_target $conf_processed_arguments" conf_processed_arguments=("--build=$conf_build_platform" "--host=$conf_openjdk_target" "--target=$conf_openjdk_target" "${conf_processed_arguments[@]}")
fi fi
# Make configure exit with error on invalid options as default. # Make configure exit with error on invalid options as default.
# Can be overridden by --disable-option-checking, since we prepend our argument # Can be overridden by --disable-option-checking, since we prepend our argument
# and later options override earlier. # and later options override earlier.
conf_processed_arguments="--enable-option-checking=fatal $conf_processed_arguments" conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arguments[@]}")
### ###
### Call the configure script ### Call the configure script
### ###
if $TEST -e $conf_closed_script_dir/generated-configure.sh; then if test -e $conf_custom_script_dir/generated-configure.sh; then
# Closed source configure available; run that instead # Custom source configure available; run that instead
. $conf_closed_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags" echo Running custom generated-configure.sh
conf_script_to_run=$conf_custom_script_dir/generated-configure.sh
else else
. $conf_script_dir/generated-configure.sh $conf_processed_arguments --with-extra-cflags="$conf_extra_cflags" --with-extra-cxxflags="$conf_extra_cxxflags" echo Running generated-configure.sh
conf_script_to_run=$conf_script_dir/generated-configure.sh
fi
if test "x$conf_debug_configure" != x; then
# Turn on shell debug output if requested (initial or recursive)
set -x
fi fi
if test "x$conf_debug_configure" = xtrue; then
# Turn on logging, but don't turn on twice when called recursive
conf_debug_logfile=./debug-configure.log
(exec 3>&1 ; (. $conf_script_to_run "${conf_processed_arguments[@]}" 2>&1 1>&3 ) | tee -a $conf_debug_logfile 1>&2 ; exec 3>&-) | tee -a $conf_debug_logfile
else
( . $conf_script_to_run "${conf_processed_arguments[@]}" )
fi
conf_result_code=$?
### ###
### Post-processing ### Post-processing
### ###
if test $conf_result_code -eq 0; then
if test "x$conf_print_help" = xtrue; then
cat <<EOT
Additional (non-autoconf) OpenJDK Options:
--openjdk-target=TARGET cross-compile with TARGET as target platform
(i.e. the one you will run the resulting binary on).
Equivalent to --host=TARGET --target=TARGET
--build=<current platform>
--debug-configure Run the configure script with additional debug
logging enabled.
Please be aware that, when cross-compiling, the OpenJDK configure script will
generally use 'target' where autoconf traditionally uses 'host'.
EOT
fi
else
echo configure exiting with result code $conf_result_code
fi
# Move the log file to the output root, if this was successfully created # Move the log file to the output root, if this was successfully created
if $TEST -d "$OUTPUT_ROOT"; then if test -d "$OUTPUT_ROOT"; then
mv -f config.log "$OUTPUT_ROOT" 2> /dev/null mv -f config.log "$OUTPUT_ROOT" 2> /dev/null
fi fi
exit $conf_result_code

View File

@@ -31,16 +31,14 @@
AC_PREREQ([2.61]) AC_PREREQ([2.61])
AC_INIT(openjdk, jdk8, build-dev@openjdk.java.net) AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
# Do not change or remove the following line, it is needed for consistency checks:
# DATE_WHEN_GENERATED: @DATE_WHEN_GENERATED@
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
m4_include([build-aux/pkg.m4]) m4_include([build-aux/pkg.m4])
# Include these first... # Include these first...
m4_include([basics.m4]) m4_include([basics.m4])
m4_include([basics_windows.m4])
m4_include([builddeps.m4]) m4_include([builddeps.m4])
# ... then the rest # ... then the rest
m4_include([boot-jdk.m4]) m4_include([boot-jdk.m4])
@@ -51,29 +49,63 @@ m4_include([libraries.m4])
m4_include([platform.m4]) m4_include([platform.m4])
m4_include([source-dirs.m4]) m4_include([source-dirs.m4])
m4_include([toolchain.m4]) m4_include([toolchain.m4])
m4_include([toolchain_windows.m4])
# This line needs to be here, verbatim, after all includes. AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
# It is replaced with closed functionality when building AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
# closed sources.
AC_DEFUN_ONCE([CLOSED_HOOK]) # This line needs to be here, verbatim, after all includes and the dummy hook
# definitions. It is replaced with custom functionality when building
# custom sources.
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
############################################################################### ###############################################################################
# #
# Initialization # Initialization / Boot-strapping
#
# The bootstrapping process needs to solve the "chicken or the egg" problem,
# thus it jumps back and forth, each time gaining something needed later on.
# #
############################################################################### ###############################################################################
# Basic initialization that must happen first of all # Basic initialization that must happen first of all
BASIC_INIT BASIC_INIT
BASIC_SETUP_FUNDAMENTAL_TOOLS
# Now we can determine OpenJDK build and target platforms. This is required to
# have early on.
PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
# Continue setting up basic stuff. Most remaining code require fundamental tools.
BASIC_SETUP_PATHS BASIC_SETUP_PATHS
BASIC_SETUP_LOGGING BASIC_SETUP_LOGGING
# These are needed to be able to create a configuration name (and thus the output directory)
JDKOPT_SETUP_JDK_VARIANT
JDKOPT_SETUP_JVM_VARIANTS
JDKOPT_SETUP_DEBUG_LEVEL
# With basic setup done, call the custom early hook.
CUSTOM_EARLY_HOOK
# To properly create a configuration name, we need to have the OpenJDK target
# and options (variants and debug level) parsed.
BASIC_SETUP_OUTPUT_DIR
# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY. # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
HELP_SETUP_DEPENDENCY_HELP HELP_SETUP_DEPENDENCY_HELP
# Setup simple tools, that do not need have cross compilation support. # Setup tools that requires more complex handling, or that is not needed by the configure script.
# Without these, we can't properly run the rest of the configure script. BASIC_SETUP_COMPLEX_TOOLS
BASIC_SETUP_TOOLS
# Check if pkg-config is available.
PKG_PROG_PKG_CONFIG
# After basic tools have been setup, we can check build os specific details.
PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
# Setup builddeps, for automatic downloading of tools we need. # Setup builddeps, for automatic downloading of tools we need.
# This is needed before we can call BDEPS_CHECK_MODULE, which is done in # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
@@ -81,22 +113,6 @@ BASIC_SETUP_TOOLS
BDEPS_CONFIGURE_BUILDDEPS BDEPS_CONFIGURE_BUILDDEPS
BDEPS_SCAN_FOR_BUILDDEPS BDEPS_SCAN_FOR_BUILDDEPS
# Check if pkg-config is available.
PKG_PROG_PKG_CONFIG
###############################################################################
#
# Determine OpenJDK build and target platforms.
#
###############################################################################
PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET
PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION
# With knowledge of the build platform, setup more basic things.
BASIC_SETUP_PATH_SEP
BASIC_SETUP_SEARCHPATH
############################################################################### ###############################################################################
# #
# Determine OpenJDK variants, options and version numbers. # Determine OpenJDK variants, options and version numbers.
@@ -104,16 +120,9 @@ BASIC_SETUP_SEARCHPATH
############################################################################### ###############################################################################
# We need build & target for this. # We need build & target for this.
JDKOPT_SETUP_JDK_VARIANT
JDKOPT_SETUP_JVM_VARIANTS
JDKOPT_SETUP_DEBUG_LEVEL
JDKOPT_SETUP_JDK_OPTIONS JDKOPT_SETUP_JDK_OPTIONS
JDKOPT_SETUP_JDK_VERSION_NUMBERS JDKOPT_SETUP_JDK_VERSION_NUMBERS
# To properly create a configuration name, we need to have the OpenJDK target
# and options (variants and debug level) parsed.
BASIC_SETUP_OUTPUT_DIR
############################################################################### ###############################################################################
# #
# Setup BootJDK, used to bootstrap the build. # Setup BootJDK, used to bootstrap the build.
@@ -141,14 +150,13 @@ SRCDIRS_SETUP_OUTPUT_DIRS
############################################################################### ###############################################################################
TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
# Locate the actual tools # Locate the actual tools
TOOLCHAIN_SETUP_PATHS TOOLCHAIN_SETUP_PATHS
# FIXME: Currently we must test this after paths but before flags. Fix! # FIXME: Currently we must test this after paths but before flags. Fix!
# And we can test some aspects on the target using configure macros. # And we can test some aspects on the target using configure macros.
PLATFORM_TEST_OPENJDK_TARGET_BITS PLATFORM_SETUP_OPENJDK_TARGET_BITS
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
# Configure flags for the tools # Configure flags for the tools
@@ -156,10 +164,6 @@ TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
# After we have toolchain, we can compile the uncygdrive helper
BASIC_COMPILE_UNCYGDRIVE
# Setup debug symbols (need objcopy from the toolchain for that) # Setup debug symbols (need objcopy from the toolchain for that)
JDKOPT_SETUP_DEBUG_SYMBOLS JDKOPT_SETUP_DEBUG_SYMBOLS
@@ -177,6 +181,9 @@ LIB_SETUP_ALSA
LIB_SETUP_MISC_LIBS LIB_SETUP_MISC_LIBS
LIB_SETUP_STATIC_LINK_LIBSTDCPP LIB_SETUP_STATIC_LINK_LIBSTDCPP
# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
BASIC_COMPILE_FIXPATH
############################################################################### ###############################################################################
# #
# We need to do some final tweaking, when everything else is done. # We need to do some final tweaking, when everything else is done.
@@ -213,8 +220,8 @@ BPERF_SETUP_CCACHE
# Check for some common pitfalls # Check for some common pitfalls
BASIC_TEST_USABILITY_ISSUES BASIC_TEST_USABILITY_ISSUES
# At the end, call the closed hook. (Dummy macro if no closed sources available) # At the end, call the custom hook. (Dummy macro if no custom sources available)
CLOSED_HOOK CUSTOM_LATE_HOOK
# We're messing a bit with internal autoconf variables to put the config.status # We're messing a bit with internal autoconf variables to put the config.status
# in the output directory instead of the current directory. # in the output directory instead of the current directory.
@@ -222,5 +229,8 @@ CONFIG_STATUS="$OUTPUT_ROOT/config.status"
# Create the actual output files. Now the main work of configure is done. # Create the actual output files. Now the main work of configure is done.
AC_OUTPUT AC_OUTPUT
# Make the compare script executable
$CHMOD +x $OUTPUT_ROOT/compare.sh
# Finally output some useful information to the user # Finally output some useful information to the user
HELP_PRINT_SUMMARY_AND_WARNINGS HELP_PRINT_SUMMARY_AND_WARNINGS

File diff suppressed because it is too large Load Diff

View File

@@ -55,6 +55,19 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
fi fi
]) ])
cygwin_help() {
case $1 in
unzip)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
zip)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
make)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
* )
break ;;
esac
}
apt_help() { apt_help() {
case $1 in case $1 in
devkit) devkit)
@@ -149,7 +162,15 @@ printf "* Debug level: $DEBUG_LEVEL\n"
printf "* JDK variant: $JDK_VARIANT\n" printf "* JDK variant: $JDK_VARIANT\n"
printf "* JVM variants: $with_jvm_variants\n" printf "* JVM variants: $with_jvm_variants\n"
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
printf "* Boot JDK: $BOOT_JDK\n"
printf "\n"
printf "Tools summary:\n"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
fi
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
printf "\n" printf "\n"
printf "Build performance summary:\n" printf "Build performance summary:\n"

View File

@@ -0,0 +1,100 @@
#
# Copyright (c) 2011, 2012, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
# Chaining of spec files
HOTSPOT_SPEC:=$(dir $(SPEC))hotspot-spec.gmk
override SPEC=$(HOTSPOT_SPEC)
# Now include the base spec.gmk file
include $(BASE_SPEC)
# Additional legacy variables defined for Hotspot
@SET_OPENJDK@
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
@BUILD_HEADLESS@
# Legacy setting: OPT or DBG
VARIANT:=@VARIANT@
# Legacy setting: true or false
FASTDEBUG:=@FASTDEBUG@
# Legacy setting: debugging the class files?
DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@
ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
# compiler that produces code that can be run on the build platform.
HOSTCC:=@FIXPATH@ @BUILD_CC@
HOSTCXX:=@FIXPATH@ @BUILD_CXX@
####################################################
#
# Legacy Hotspot support
# If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here.
@DEFINE_CROSS_COMPILE_ARCH@
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
PLATFORM=$(OPENJDK_TARGET_OS)
# 32 or 64 bit
ARCH_DATA_MODEL=$(OPENJDK_TARGET_CPU_BITS)
ALT_BOOTDIR=$(BOOT_JDK)
# Can be /sparcv9 or /amd64 on Solaris
ISA_DIR=$(OPENJDK_TARGET_CPU_ISADIR)
# Yet another name for arch used for an extra subdir below the jvm lib.
# Uses i386 and amd64, instead of x86 and x86_64.
LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB)
# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of x86 and x86_64.
ARCH=$(OPENJDK_TARGET_CPU_LEGACY)
# Legacy setting for building for a 64 bit machine.
# If yes then this expands to _LP64:=1
@LP64@
ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
ALT_EXPORT_PATH=$(HOTSPOT_DIST)
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@
# This is used from the libjvm build for C/C++ code.
HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
# Control wether Hotspot runs Queens test after building
TEST_IN_BUILD=@TEST_IN_BUILD@
# For hotspot, override compiler/tools definition to not include FIXPATH prefix.
# Hotspot has its own handling on the Windows path situation.
CXX:=@CCACHE@ @HOTSPOT_CXX@
LD:=@HOTSPOT_LD@
MT:=@HOTSPOT_MT@
RC:=@HOTSPOT_RC@
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
# This is needed to get the LOG setting to work properly.
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk

View File

@@ -30,7 +30,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
# Check which variant of the JDK that we want to build. # Check which variant of the JDK that we want to build.
# Currently we have: # Currently we have:
# normal: standard edition # normal: standard edition
# embedded: cut down to a smaller footprint # but the custom make system may add other variants
# #
# Effectively the JDK variant gives a name to a specific set of # Effectively the JDK variant gives a name to a specific set of
# modules to compile into the JDK. In the future, these modules # modules to compile into the JDK. In the future, these modules
@@ -38,22 +38,14 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
# #
AC_MSG_CHECKING([which variant of the JDK to build]) AC_MSG_CHECKING([which variant of the JDK to build])
AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant], AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
[JDK variant to build (normal, embedded) @<:@normal@:>@])]) [JDK variant to build (normal) @<:@normal@:>@])])
if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
JAVASE_EMBEDDED=""
MINIMIZE_RAM_USAGE=""
JDK_VARIANT="normal" JDK_VARIANT="normal"
elif test "x$with_jdk_variant" = xembedded; then
JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true"
MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true"
JDK_VARIANT="embedded"
else else
AC_MSG_ERROR([The available JDK variants are: normal, embedded]) AC_MSG_ERROR([The available JDK variants are: normal])
fi fi
AC_SUBST(JAVASE_EMBEDDED)
AC_SUBST(MINIMIZE_RAM_USAGE)
AC_SUBST(JDK_VARIANT) AC_SUBST(JDK_VARIANT)
AC_MSG_RESULT([$JDK_VARIANT]) AC_MSG_RESULT([$JDK_VARIANT])
@@ -72,16 +64,12 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
# zero: no machine code interpreter, no compiler # zero: no machine code interpreter, no compiler
# zeroshark: zero interpreter and shark/llvm compiler backend # zeroshark: zero interpreter and shark/llvm compiler backend
AC_MSG_CHECKING([which variants of the JVM that should be built]) AC_MSG_CHECKING([which variants of the JVM to build])
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
[JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])]) [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])])
if test "x$with_jvm_variants" = x; then if test "x$with_jvm_variants" = x; then
if test "x$JDK_VARIANT" = xembedded; then with_jvm_variants="server"
with_jvm_variants="client"
else
with_jvm_variants="server"
fi
fi fi
JVM_VARIANTS=",$with_jvm_variants," JVM_VARIANTS=",$with_jvm_variants,"
@@ -125,6 +113,11 @@ AC_SUBST(JVM_VARIANT_KERNEL)
AC_SUBST(JVM_VARIANT_ZERO) AC_SUBST(JVM_VARIANT_ZERO)
AC_SUBST(JVM_VARIANT_ZEROSHARK) AC_SUBST(JVM_VARIANT_ZEROSHARK)
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
MACOSX_UNIVERSAL="true"
fi
AC_SUBST(MACOSX_UNIVERSAL)
]) ])
@@ -223,6 +216,14 @@ fi
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
# On Macosx universal binaries are produced, but they only contain
# 64 bit intel. This invalidates control of which jvms are built
# from configure, but only server is valid anyway. Fix this
# when hotspot makefiles are rewritten.
if test "x$MACOSX_UNIVERSAL" = xtrue; then
HOTSPOT_TARGET=universal_product
fi
##### #####
AC_SUBST(DEBUG_LEVEL) AC_SUBST(DEBUG_LEVEL)
@@ -240,40 +241,39 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
# Should we build only OpenJDK even if closed sources are present? # Should we build only OpenJDK even if closed sources are present?
# #
AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only],
[build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,) [supress building closed source even if present @<:@disabled@:>@])],,[enable_openjdk_only="no"])
if test "x$enable_openjdk_only" = "xyes"; then AC_MSG_CHECKING([for presence of closed sources])
OPENJDK=true if test -d "$SRC_ROOT/jdk/src/closed"; then
elif test "x$enable_openjdk_only" = "xno"; then CLOSED_SOURCE_PRESENT=yes
OPENJDK=false
elif test -d "$SRC_ROOT/jdk/src/closed"; then
OPENJDK=false
else else
CLOSED_SOURCE_PRESENT=no
fi
AC_MSG_RESULT([$CLOSED_SOURCE_PRESENT])
AC_MSG_CHECKING([if closed source is supressed (openjdk-only)])
SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
AC_MSG_RESULT([$SUPRESS_CLOSED_SOURCE])
if test "x$CLOSED_SOURCE_PRESENT" = xno; then
OPENJDK=true
if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
AC_MSG_WARN([No closed source present, --enable-openjdk-only makes no sense])
fi
else
if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
OPENJDK=true OPENJDK=true
else
OPENJDK=false
fi
fi fi
if test "x$OPENJDK" = "xtrue"; then if test "x$OPENJDK" = "xtrue"; then
SET_OPENJDK=OPENJDK=true SET_OPENJDK="OPENJDK=true"
fi fi
AC_SUBST(SET_OPENJDK) AC_SUBST(SET_OPENJDK)
###############################################################################
#
# JIGSAW or not. The JIGSAW variable is used during the intermediate
# stage when we are building both the old style JDK and the new style modularized JDK.
# When the modularized JDK is finalized, this option will go away.
#
AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw],
[build Jigsaw images (not yet available) @<:@disabled@:>@])],,)
if test "x$enable_jigsaw" = "xyes"; then
JIGSAW=true
else
JIGSAW=false
fi
AC_SUBST(JIGSAW)
############################################################################### ###############################################################################
# #
# Should we build a JDK/JVM with headful support (ie a graphical ui)? # Should we build a JDK/JVM with headful support (ie a graphical ui)?
@@ -281,7 +281,7 @@ AC_SUBST(JIGSAW)
# #
AC_MSG_CHECKING([headful support]) AC_MSG_CHECKING([headful support])
AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful], AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
[build headful support (graphical UI support) @<:@enabled@:>@])], [disable building headful support (graphical UI support) @<:@enabled@:>@])],
[SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes]) [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
SUPPORT_HEADLESS=yes SUPPORT_HEADLESS=yes
@@ -289,14 +289,12 @@ BUILD_HEADLESS="BUILD_HEADLESS:=true"
if test "x$SUPPORT_HEADFUL" = xyes; then if test "x$SUPPORT_HEADFUL" = xyes; then
# We are building both headful and headless. # We are building both headful and headless.
BUILD_HEADLESS_ONLY=""
headful_msg="inlude support for both headful and headless" headful_msg="inlude support for both headful and headless"
fi fi
if test "x$SUPPORT_HEADFUL" = xno; then if test "x$SUPPORT_HEADFUL" = xno; then
# Thus we are building headless only. # Thus we are building headless only.
BUILD_HEADLESS="BUILD_HEADLESS:=true" BUILD_HEADLESS="BUILD_HEADLESS:=true"
BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true"
headful_msg="headless only" headful_msg="headless only"
fi fi
@@ -305,43 +303,10 @@ AC_MSG_RESULT([$headful_msg])
AC_SUBST(SUPPORT_HEADLESS) AC_SUBST(SUPPORT_HEADLESS)
AC_SUBST(SUPPORT_HEADFUL) AC_SUBST(SUPPORT_HEADFUL)
AC_SUBST(BUILD_HEADLESS) AC_SUBST(BUILD_HEADLESS)
AC_SUBST(BUILD_HEADLESS_ONLY)
###############################################################################
#
# Should we run the painfully slow javadoc tool?
#
AC_MSG_CHECKING([whether to build documentation])
AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs],
[enable generation of Javadoc documentation @<:@disabled@:>@])],
[ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no'])
AC_MSG_RESULT([$ENABLE_DOCS])
AC_SUBST(ENABLE_DOCS)
GENERATE_DOCS=false
if test "x$ENABLE_DOCS" = xyes; then
GENERATE_DOCS=true
fi
AC_SUBST(GENERATE_DOCS)
###############################################################################
#
# Should we compile nimbus swing L&F? We can probably remove this option
# since nimbus is officially part of javax now.
#
AC_MSG_CHECKING([whether to build nimbus L&F])
AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus],
[disable Nimbus L&F @<:@enabled@:>@])],
[ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes'])
AC_MSG_RESULT([$ENABLE_NIMBUS])
DISABLE_NIMBUS=
if test "x$ENABLE_NIMBUS" = xno; then
DISABLE_NIMBUS=true
fi
AC_SUBST(DISABLE_NIMBUS)
# Control wether Hotspot runs Queens test after build. # Control wether Hotspot runs Queens test after build.
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
[enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],, [run the Queens test after Hotspot build @<:@disabled@:>@])],,
[enable_hotspot_test_in_build=no]) [enable_hotspot_test_in_build=no])
if test "x$enable_hotspot_test_in_build" = "xyes"; then if test "x$enable_hotspot_test_in_build" = "xyes"; then
TEST_IN_BUILD=true TEST_IN_BUILD=true
@@ -367,49 +332,27 @@ else
fi fi
AC_SUBST(CACERTS_FILE) AC_SUBST(CACERTS_FILE)
###############################################################################
#
# Enable or disable unlimited crypto
#
AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
[Enable unlimited crypto policy @<:@disabled@:>@])],,
[enable_unlimited_crypto=no])
if test "x$enable_unlimited_crypto" = "xyes"; then
UNLIMITED_CRYPTO=true
else
UNLIMITED_CRYPTO=false
fi
AC_SUBST(UNLIMITED_CRYPTO)
############################################################################### ###############################################################################
# #
# Compress jars # Compress jars
# #
COMPRESS_JARS=false COMPRESS_JARS=false
# default for embedded is yes...
if test "x$JDK_VARIANT" = "xembedded"; then
COMPRESS_JARS=true
fi
AC_SUBST(COMPRESS_JARS) AC_SUBST(COMPRESS_JARS)
###############################################################################
#
# Should we compile JFR
# default no, except for on closed-jdk and !embedded
#
ENABLE_JFR=no
# Is the JFR source present
#
# For closed && !embedded default is yes if the source is present
#
if test "x${OPENJDK}" != "xtrue" && test "x$JDK_VARIANT" != "xembedded" && test -d "$SRC_ROOT/jdk/src/closed/share/native/oracle/jfr"; then
ENABLE_JFR=yes
fi
AC_MSG_CHECKING([whether to build jfr])
AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr],
[enable jfr (default is no)])]
[ENABLE_JFR="${enableval}"])
AC_MSG_RESULT([${ENABLE_JFR}])
if test "x$ENABLE_JFR" = "xyes"; then
ENABLE_JFR=true
elif test "x$ENABLE_JFR" = "xno"; then
ENABLE_JFR=false
else
AC_MSG_ERROR([Invalid argument to --enable-jfr])
fi
AC_SUBST(ENABLE_JFR)
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
@@ -431,6 +374,8 @@ AC_SUBST(PRODUCT_NAME)
AC_SUBST(PRODUCT_SUFFIX) AC_SUBST(PRODUCT_SUFFIX)
AC_SUBST(JDK_RC_PLATFORM_NAME) AC_SUBST(JDK_RC_PLATFORM_NAME)
AC_SUBST(COMPANY_NAME) AC_SUBST(COMPANY_NAME)
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
COPYRIGHT_YEAR=`date +'%Y'` COPYRIGHT_YEAR=`date +'%Y'`
AC_SUBST(COPYRIGHT_YEAR) AC_SUBST(COPYRIGHT_YEAR)
@@ -459,7 +404,7 @@ else
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
# Avoid [:alnum:] since it depends on the locale. # Avoid [:alnum:] since it depends on the locale.
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'` USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}" FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
fi fi
AC_SUBST(FULL_VERSION) AC_SUBST(FULL_VERSION)
@@ -469,7 +414,7 @@ AC_SUBST(COOKED_BUILD_NUMBER)
AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS], AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
[ [
HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET" HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
AC_SUBST(HOTSPOT_MAKE_ARGS) AC_SUBST(HOTSPOT_MAKE_ARGS)
# The name of the Service Agent jar. # The name of the Service Agent jar.
@@ -494,13 +439,8 @@ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ENABLE_DEBUG_SYMBOLS=no ENABLE_DEBUG_SYMBOLS=no
fi fi
# default for embedded is no...
if test "x$JDK_VARIANT" = "xembedded"; then
ENABLE_DEBUG_SYMBOLS=no
fi
AC_ARG_ENABLE([debug-symbols], AC_ARG_ENABLE([debug-symbols],
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols (@<:@enabled@:>@)])], [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
[ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}], [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
) )
@@ -514,7 +454,7 @@ fi
if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
# Default is on if objcopy is found, otherwise off # Default is on if objcopy is found, otherwise off
if test "x$OBJCOPY" != x; then if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
ENABLE_DEBUG_SYMBOLS=yes ENABLE_DEBUG_SYMBOLS=yes
else else
ENABLE_DEBUG_SYMBOLS=no ENABLE_DEBUG_SYMBOLS=no
@@ -529,7 +469,7 @@ AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
ZIP_DEBUGINFO_FILES=yes ZIP_DEBUGINFO_FILES=yes
AC_ARG_ENABLE([zip-debug-info], AC_ARG_ENABLE([zip-debug-info],
[AS_HELP_STRING([--disable-zip-debug-info],[don't zip debug-info files (@<:@enabled@:@)])], [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
[ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}], [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
) )
@@ -549,3 +489,11 @@ AC_SUBST(ZIP_DEBUGINFO_FILES)
AC_SUBST(CFLAGS_DEBUG_SYMBOLS) AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS) AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
]) ])
# Support for customization of the build process. Some build files
# will include counterparts from this location, if they exist. This allows
# for a degree of customization of the build targets and the rules/recipes
# to create them
AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
[use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
AC_SUBST(CUSTOM_MAKE_DIR)

View File

@@ -73,6 +73,10 @@ if test "x$OPENJDK" = "xfalse"; then
FREETYPE2_NOT_NEEDED=yes FREETYPE2_NOT_NEEDED=yes
fi fi
if test "x$SUPPORT_HEADFUL" = xno; then
X11_NOT_NEEDED=yes
fi
############################################################################### ###############################################################################
# #
# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
@@ -168,9 +172,15 @@ fi
AC_LANG_PUSH(C) AC_LANG_PUSH(C)
OLD_CFLAGS="$CFLAGS" OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $X_CFLAGS" CFLAGS="$CFLAGS $X_CFLAGS"
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h], AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
[X11_A_OK=yes], [X11_A_OK=yes],
[X11_A_OK=no]) [X11_A_OK=no],
[ # include <X11/Xlib.h>
# include <X11/Xutil.h>
])
CFLAGS="$OLD_CFLAGS" CFLAGS="$OLD_CFLAGS"
AC_LANG_POP(C) AC_LANG_POP(C)
@@ -192,27 +202,23 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
# #
AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups], AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
[specify prefix directory for the cups package [specify prefix directory for the cups package
(expecting the libraries under PATH/lib and the headers under PATH/include)])]) (expecting the headers under PATH/include)])])
AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include], AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
[specify directory for the cups include files])]) [specify directory for the cups include files])])
AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib],
[specify directory for the cups library])])
if test "x$CUPS_NOT_NEEDED" = xyes; then if test "x$CUPS_NOT_NEEDED" = xyes; then
if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
AC_MSG_WARN([cups not used, so --with-cups is ignored]) AC_MSG_WARN([cups not used, so --with-cups is ignored])
fi fi
CUPS_CFLAGS= CUPS_CFLAGS=
CUPS_LIBS=
else else
CUPS_FOUND=no CUPS_FOUND=no
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.]) AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
fi fi
if test "x${with_cups}" != x; then if test "x${with_cups}" != x; then
CUPS_LIBS="-L${with_cups}/lib -lcups"
CUPS_CFLAGS="-I${with_cups}/include" CUPS_CFLAGS="-I${with_cups}/include"
CUPS_FOUND=yes CUPS_FOUND=yes
fi fi
@@ -220,10 +226,6 @@ else
CUPS_CFLAGS="-I${with_cups_include}" CUPS_CFLAGS="-I${with_cups_include}"
CUPS_FOUND=yes CUPS_FOUND=yes
fi fi
if test "x${with_cups_lib}" != x; then
CUPS_LIBS="-L${with_cups_lib} -lcups"
CUPS_FOUND=yes
fi
if test "x$CUPS_FOUND" = xno; then if test "x$CUPS_FOUND" = xno; then
BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes]) BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
fi fi
@@ -232,23 +234,20 @@ else
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
[CUPS_FOUND=yes [CUPS_FOUND=yes
CUPS_CFLAGS= CUPS_CFLAGS=
CUPS_LIBS="-lcups"
DEFAULT_CUPS=yes]) DEFAULT_CUPS=yes])
fi fi
if test "x$CUPS_FOUND" = xno; then if test "x$CUPS_FOUND" = xno; then
# Getting nervous now? Lets poke around for standard Solaris third-party # Getting nervous now? Lets poke around for standard Solaris third-party
# package installation locations. # package installation locations.
AC_MSG_CHECKING([for cups headers and libs]) AC_MSG_CHECKING([for cups headers])
if test -s /opt/sfw/cups/include/cups/cups.h; then if test -s /opt/sfw/cups/include/cups/cups.h; then
# An SFW package seems to be installed! # An SFW package seems to be installed!
CUPS_FOUND=yes CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/sfw/cups/include" CUPS_CFLAGS="-I/opt/sfw/cups/include"
CUPS_LIBS="-L/opt/sfw/cups/lib -lcups"
elif test -s /opt/csw/include/cups/cups.h; then elif test -s /opt/csw/include/cups/cups.h; then
# A CSW package seems to be installed! # A CSW package seems to be installed!
CUPS_FOUND=yes CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/csw/include" CUPS_CFLAGS="-I/opt/csw/include"
CUPS_LIBS="-L/opt/csw/lib -lcups"
fi fi
AC_MSG_RESULT([$CUPS_FOUND]) AC_MSG_RESULT([$CUPS_FOUND])
fi fi
@@ -259,7 +258,6 @@ else
fi fi
AC_SUBST(CUPS_CFLAGS) AC_SUBST(CUPS_CFLAGS)
AC_SUBST(CUPS_LIBS)
]) ])
@@ -288,17 +286,21 @@ else
FREETYPE2_FOUND=no FREETYPE2_FOUND=no
if test "x$with_freetype" != x; then if test "x$with_freetype" != x; then
SPACESAFE(with_freetype,[the path to freetype]) BASIC_FIXUP_PATH(with_freetype)
FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
FREETYPE2_LIB_PATH="$with_freetype/lib"
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then if test "x$OPENJDK_TARGET_OS" = xwindows; then
FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
fi fi
FREETYPE2_LIB_PATH="$with_freetype/lib"
FREETYPE2_CFLAGS="-I$with_freetype/include" FREETYPE2_CFLAGS="-I$with_freetype/include"
if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
fi fi
FREETYPE2_FOUND=yes FREETYPE2_FOUND=yes
if test "x$FREETYPE2_FOUND" = xyes; then if test "x$FREETYPE2_FOUND" = xyes; then
# Verify that the directories exist # Verify that the directories exist
if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
@@ -307,7 +309,7 @@ else
# List the contents of the lib. # List the contents of the lib.
FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
if test "x$FREETYPELIB" = x; then if test "x$FREETYPELIB" = x; then
AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib]) AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib])
fi fi
# Check one h-file # Check one h-file
if ! test -s "$with_freetype/include/ft2build.h"; then if ! test -s "$with_freetype/include/ft2build.h"; then
@@ -319,9 +321,34 @@ else
BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
USING_SYSTEM_FT_LIB=true USING_SYSTEM_FT_LIB=true
fi fi
if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
BASIC_FIXUP_PATH(FREETYPELOCATION)
AC_MSG_CHECKING([for freetype in some standard windows locations])
if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
if ! test -s "$FREETYPE2_LIBS"; then
AC_MSG_ERROR([Could not find $FREETYPE2_LIBS])
fi
if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll])
fi
USING_SYSTEM_FT_LIB=true
FREETYPE2_FOUND=yes
fi
AC_MSG_RESULT([$FREETYPE2_FOUND])
fi
if test "x$FREETYPE2_FOUND" = xno; then if test "x$FREETYPE2_FOUND" = xno; then
PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
USING_SYSTEM_FT_LIB=true USING_SYSTEM_FT_LIB=true
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
fi
fi fi
if test "x$FREETYPE2_FOUND" = xno; then if test "x$FREETYPE2_FOUND" = xno; then
AC_MSG_CHECKING([for freetype in some standard locations]) AC_MSG_CHECKING([for freetype in some standard locations])
@@ -360,7 +387,15 @@ else
if test "x$FREETYPE2_FOUND" = xno; then if test "x$FREETYPE2_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([freetype2]) HELP_MSG_MISSING_DEPENDENCY([freetype2])
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]) AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
fi fi
if test "x$OPENJDK_TARGET_OS" != xwindows; then
# AC_CHECK_LIB does not support use of cl.exe
PREV_LDFLAGS="$LDFLAGS"
LDFLAGS="$FREETYPE2_LIBS"
AC_CHECK_LIB(freetype, FT_Init_FreeType, [], AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]))
LDFLAGS="$PREV_LDFLAGS"
fi
fi fi
AC_SUBST(USING_SYSTEM_FT_LIB) AC_SUBST(USING_SYSTEM_FT_LIB)
@@ -518,9 +553,7 @@ AC_SUBST(USE_EXTERNAL_LIBZ)
############################################################################### ###############################################################################
LIBZIP_CAN_USE_MMAP=true LIBZIP_CAN_USE_MMAP=true
if test "x$JDK_VARIANT" = "xembedded"; then
LIBZIP_CAN_USE_MMAP=false
fi
AC_SUBST(LIBZIP_CAN_USE_MMAP) AC_SUBST(LIBZIP_CAN_USE_MMAP)
############################################################################### ###############################################################################
@@ -619,17 +652,20 @@ if test "x$OPENJDK_TARGET_OS" = xlinux; then
if test "x$enable_static_link_stdc__" = xyes; then if test "x$enable_static_link_stdc__" = xyes; then
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
LDCXX="$CC" LDCXX="$CC"
STATIC_CXX_SETTING="STATIC_CXX=true"
AC_MSG_RESULT([static]) AC_MSG_RESULT([static])
else else
LIBCXX="$LIBCXX -lstdc++" LIBCXX="$LIBCXX -lstdc++"
LDCXX="$CXX" LDCXX="$CXX"
STATIC_CXX_SETTING="STATIC_CXX=false"
AC_MSG_RESULT([dynamic]) AC_MSG_RESULT([dynamic])
fi fi
fi fi
AC_SUBST(STATIC_CXX_SETTING)
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
LIBCXX="/usr/lib${LEGACY_OPENJDK_TARGET_CPU3}/libCrun.so.1" LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
fi fi
# TODO better (platform agnostic) test # TODO better (platform agnostic) test

View File

@@ -23,279 +23,96 @@
# questions. # questions.
# #
AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS], # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
[ # Converts autoconf style CPU name to OpenJDK style, into
# Expects $host_os $host_cpu $build_os and $build_cpu # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
# and $with_target_bits to have been setup!
#
# Translate the standard triplet(quadruplet) definition
# of the target/build system into
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
# OPENJDK_TARGET_OS_API=posix,winapi
#
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
# OPENJDK_TARGET_CPU_BITS=32,64
# OPENJDK_TARGET_CPU_ENDIAN=big,little
#
# The same values are setup for BUILD_...
#
# And the legacy variables, for controlling the old makefiles.
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
# LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris)
# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows
#
# We also copy the autoconf trip/quadruplet
# verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM
OPENJDK_TARGET_SYSTEM="$host"
OPENJDK_BUILD_SYSTEM="$build"
AC_SUBST(OPENJDK_TARGET_SYSTEM)
AC_SUBST(OPENJDK_BUILD_SYSTEM)
PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_TARGET,$host_os)
PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_TARGET,$host_cpu)
PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_BUILD,$build_os)
PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_BUILD,$build_cpu)
if test "x$OPENJDK_TARGET_OS" != xsolaris; then
LEGACY_OPENJDK_TARGET_CPU3=""
LEGACY_OPENJDK_BUILD_CPU3=""
fi
# On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ...
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then
LEGACY_OPENJDK_TARGET_CPU1="x86_64"
fi
PLATFORM_SET_RELEASE_FILE_OS_VALUES
])
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS_TO],
[
PLATFORM_EXTRACT_VARS_FROM_OS($2)
$1_OS="$VAR_OS"
$1_OS_FAMILY="$VAR_OS_FAMILY"
$1_OS_API="$VAR_OS_API"
AC_SUBST($1_OS)
AC_SUBST($1_OS_FAMILY)
AC_SUBST($1_OS_API)
if test "x$$1_OS_API" = xposix; then
LEGACY_$1_OS_API="solaris"
fi
if test "x$$1_OS_API" = xwinapi; then
LEGACY_$1_OS_API="windows"
fi
AC_SUBST(LEGACY_$1_OS_API)
])
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU_TO],
[
PLATFORM_EXTRACT_VARS_FROM_CPU($2)
$1_CPU="$VAR_CPU"
$1_CPU_ARCH="$VAR_CPU_ARCH"
$1_CPU_BITS="$VAR_CPU_BITS"
$1_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST($1_CPU)
AC_SUBST($1_CPU_ARCH)
AC_SUBST($1_CPU_BITS)
AC_SUBST($1_CPU_ENDIAN)
# Also store the legacy naming of the cpu.
# Ie i586 and amd64 instead of ia32 and x64
LEGACY_$1_CPU1="$VAR_LEGACY_CPU"
AC_SUBST(LEGACY_$1_CPU1)
# And the second legacy naming of the cpu.
# Ie i386 and amd64 instead of ia32 and x64.
LEGACY_$1_CPU2="$LEGACY_$1_CPU1"
if test "x$LEGACY_$1_CPU1" = xi586; then
LEGACY_$1_CPU2=i386
fi
AC_SUBST(LEGACY_$1_CPU2)
# And the third legacy naming of the cpu.
# Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
LEGACY_$1_CPU3=""
if test "x$$1_CPU" = xx64; then
LEGACY_$1_CPU3=amd64
fi
if test "x$$1_CPU" = xsparcv9; then
LEGACY_$1_CPU3=sparcv9
fi
AC_SUBST(LEGACY_$1_CPU3)
])
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU], AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
[ [
# First argument is the cpu name from the trip/quad # First argument is the cpu name from the trip/quad
case "$1" in case "$1" in
x86_64) x86_64)
VAR_CPU=x64 VAR_CPU=x86_64
VAR_CPU_ARCH=x86 VAR_CPU_ARCH=x86
VAR_CPU_BITS=64 VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little VAR_CPU_ENDIAN=little
VAR_LEGACY_CPU=amd64
;; ;;
i?86) i?86)
VAR_CPU=ia32 VAR_CPU=x86
VAR_CPU_ARCH=x86 VAR_CPU_ARCH=x86
VAR_CPU_BITS=32 VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little VAR_CPU_ENDIAN=little
VAR_LEGACY_CPU=i586
;;
alpha*)
VAR_CPU=alpha
VAR_CPU_ARCH=alpha
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=alpha
;; ;;
arm*) arm*)
VAR_CPU=arm VAR_CPU=arm
VAR_CPU_ARCH=arm VAR_CPU_ARCH=arm
VAR_CPU_BITS=32 VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little VAR_CPU_ENDIAN=little
VAR_LEGACY_CPU=arm
;; ;;
mips)
VAR_CPU=mips
VAR_CPU_ARCH=mips
VAR_CPU_BITS=woot
VAR_CPU_ENDIAN=woot
VAR_LEGACY_CPU=mips
;;
mipsel)
VAR_CPU=mipsel
VAR_CPU_ARCH=mips
VAR_CPU_BITS=woot
VAR_CPU_ENDIAN=woot
VAR_LEGACY_CPU=mipsel
;;
powerpc) powerpc)
VAR_CPU=ppc VAR_CPU=ppc
VAR_CPU_ARCH=ppc VAR_CPU_ARCH=ppc
VAR_CPU_BITS=32 VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=ppc
;; ;;
powerpc64) powerpc64)
VAR_CPU=ppc64 VAR_CPU=ppc64
VAR_CPU_ARCH=ppc VAR_CPU_ARCH=ppc
VAR_CPU_BITS=64 VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=ppc64
;; ;;
sparc) sparc)
VAR_CPU=sparc VAR_CPU=sparc
VAR_CPU_ARCH=sparc VAR_CPU_ARCH=sparc
VAR_CPU_BITS=32 VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=sparc
;; ;;
sparc64) sparcv9)
VAR_CPU=sparcv9 VAR_CPU=sparcv9
VAR_CPU_ARCH=sparc VAR_CPU_ARCH=sparc
VAR_CPU_BITS=64 VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=sparcv9
;;
s390)
VAR_CPU=s390
VAR_CPU_ARCH=s390
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=woot
VAR_LEGACY_CPU=s390
VAR_LEGACY_CPU=s390
;;
s390x)
VAR_CPU=s390x
VAR_CPU_ARCH=s390
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=woot
VAR_LEGACY_CPU=s390x
;; ;;
*) *)
AC_MSG_ERROR([unsupported cpu $1]) AC_MSG_ERROR([unsupported cpu $1])
;; ;;
esac esac
# Workaround cygwin not knowing about 64 bit.
if test "x$VAR_OS" = "xwindows"; then
if test "x$PROCESSOR_IDENTIFIER" != "x"; then
PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
case "$PROC_ARCH" in
intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
VAR_CPU=x64
VAR_CPU_BITS=64
VAR_LEGACY_CPU=amd64
;;
esac
fi
fi
# on solaris x86...default seems to be 32-bit
if test "x$VAR_OS" = "xsolaris" && \
test "x$with_target_bits" = "x" && \
test "x$VAR_CPU_ARCH" = "xx86"
then
with_target_bits=32
fi
if test "x$VAR_CPU_ARCH" = "xx86"; then
if test "x$with_target_bits" = "x64"; then
VAR_CPU=x64
VAR_CPU_BITS=64
VAR_LEGACY_CPU=amd64
fi
if test "x$with_target_bits" = "x32"; then
VAR_CPU=ia32
VAR_CPU_BITS=32
VAR_LEGACY_CPU=i586
fi
fi
if test "x$VAR_CPU_ARCH" = "xsparc"; then
if test "x$with_target_bits" = "x64"; then
VAR_CPU=sparcv9
VAR_CPU_BITS=64
VAR_LEGACY_CPU=sparcv9
fi
fi
]) ])
# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
# Converts autoconf style OS name to OpenJDK style, into
# VAR_OS and VAR_OS_API.
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS], AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
[ [
case "$1" in case "$1" in
*linux*) *linux*)
VAR_OS=linux VAR_OS=linux
VAR_OS_API=posix VAR_OS_API=posix
VAR_OS_FAMILY=gnu VAR_OS_ENV=linux
;; ;;
*solaris*) *solaris*)
VAR_OS=solaris VAR_OS=solaris
VAR_OS_API=posix VAR_OS_API=posix
VAR_OS_FAMILY=sysv VAR_OS_ENV=solaris
;; ;;
*darwin*) *darwin*)
VAR_OS=macosx VAR_OS=macosx
VAR_OS_API=posix VAR_OS_API=posix
VAR_OS_FAMILY=bsd VAR_OS_ENV=macosx
;; ;;
*bsd*) *bsd*)
VAR_OS=bsd VAR_OS=bsd
VAR_OS_API=posix VAR_OS_API=posix
VAR_OS_FAMILY=bsd VAR_OS_ENV=bsd
;; ;;
*cygwin*|*windows*) *cygwin*)
VAR_OS=windows VAR_OS=windows
VAR_OS_API=winapi VAR_OS_API=winapi
VAR_OS_FAMILY=windows VAR_OS_ENV=windows.cygwin
;;
*mingw*)
VAR_OS=windows
VAR_OS_API=winapi
VAR_OS_ENV=windows.msys
;; ;;
*) *)
AC_MSG_ERROR([unsupported operating system $1]) AC_MSG_ERROR([unsupported operating system $1])
@@ -303,6 +120,220 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
esac esac
]) ])
# Expects $host_os $host_cpu $build_os and $build_cpu
# and $with_target_bits to have been setup!
#
# Translate the standard triplet(quadruplet) definition
# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
# OPENJDK_BUILD_OS, etc.
AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
[
# Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
# (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
# Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
# but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
OPENJDK_TARGET_AUTOCONF_NAME="$host"
OPENJDK_BUILD_AUTOCONF_NAME="$build"
AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME)
AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME)
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
PLATFORM_EXTRACT_VARS_FROM_OS($build_os)
PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu)
# ..and setup our own variables. (Do this explicitely to facilitate searching)
OPENJDK_BUILD_OS="$VAR_OS"
OPENJDK_BUILD_OS_API="$VAR_OS_API"
OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
OPENJDK_BUILD_CPU="$VAR_CPU"
OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST(OPENJDK_BUILD_OS)
AC_SUBST(OPENJDK_BUILD_OS_API)
AC_SUBST(OPENJDK_BUILD_CPU)
AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
AC_SUBST(OPENJDK_BUILD_CPU_BITS)
AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN)
AC_MSG_CHECKING([openjdk-build os-cpu])
AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU])
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
PLATFORM_EXTRACT_VARS_FROM_OS($host_os)
PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
# ... and setup our own variables. (Do this explicitely to facilitate searching)
OPENJDK_TARGET_OS="$VAR_OS"
OPENJDK_TARGET_OS_API="$VAR_OS_API"
OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
OPENJDK_TARGET_CPU="$VAR_CPU"
OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST(OPENJDK_TARGET_OS)
AC_SUBST(OPENJDK_TARGET_OS_API)
AC_SUBST(OPENJDK_TARGET_CPU)
AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
AC_SUBST(OPENJDK_TARGET_CPU_BITS)
AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
AC_MSG_CHECKING([openjdk-target os-cpu])
AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
])
# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
# accordingly. Must be done after setting up build and target system, but before
# doing anything else with these values.
AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
[
AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
[build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
# We have three types of compiles:
# native == normal compilation, target system == build system
# cross == traditional cross compilation, target system != build system; special toolchain needed
# reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
#
if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
# We're doing a proper cross-compilation
COMPILE_TYPE="cross"
else
COMPILE_TYPE="native"
fi
if test "x$with_target_bits" != x; then
if test "x$COMPILE_TYPE" = "xcross"; then
AC_MSG_ERROR([It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either.])
fi
if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
# A reduced build is requested
COMPILE_TYPE="reduced"
OPENJDK_TARGET_CPU_BITS=32
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
OPENJDK_TARGET_CPU=x86
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
OPENJDK_TARGET_CPU=sparc
else
AC_MSG_ERROR([Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9])
fi
elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
AC_MSG_ERROR([It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead.])
elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
AC_MSG_NOTICE([--with-target-bits are set to build platform address size; argument has no meaning])
else
AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!])
fi
fi
AC_SUBST(COMPILE_TYPE)
AC_MSG_CHECKING([compilation type])
AC_MSG_RESULT([$COMPILE_TYPE])
])
# Setup the legacy variables, for controlling the old makefiles.
#
AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
[
# Also store the legacy naming of the cpu.
# Ie i586 and amd64 instead of x86 and x86_64
OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
if test "x$OPENJDK_TARGET_CPU" = xx86; then
OPENJDK_TARGET_CPU_LEGACY="i586"
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except MacOSX replace x86_64 with amd64.
OPENJDK_TARGET_CPU_LEGACY="amd64"
fi
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY)
# And the second legacy naming of the cpu.
# Ie i386 and amd64 instead of x86 and x86_64.
OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
if test "x$OPENJDK_TARGET_CPU" = xx86; then
OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
fi
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB)
# This is the name of the cpu (but using i386 and amd64 instead of
# x86 and x86_64, respectively), preceeded by a /, to be used when
# locating libraries. On macosx, it's empty, though.
OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
OPENJDK_TARGET_CPU_LIBDIR=""
fi
AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
# OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
# /amd64 or /sparcv9. This string is appended to some library paths, like this:
# /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
OPENJDK_TARGET_CPU_ISADIR=""
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
OPENJDK_TARGET_CPU_ISADIR="/amd64"
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
fi
fi
AC_SUBST(OPENJDK_TARGET_CPU_ISADIR)
# Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
# On linux only, we replace x86 with i386.
OPENJDK_TARGET_CPU_OSARCH="i386"
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except macosx, we replace x86_64 with amd64.
OPENJDK_TARGET_CPU_OSARCH="amd64"
fi
AC_SUBST(OPENJDK_TARGET_CPU_OSARCH)
OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
if test "x$OPENJDK_TARGET_CPU" = xx86; then
OPENJDK_TARGET_CPU_JLI="i386"
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except macosx, we replace x86_64 with amd64.
OPENJDK_TARGET_CPU_JLI="amd64"
fi
# Now setup the -D flags for building libjli.
OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
fi
fi
AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
# Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
if test "x$OPENJDK_TARGET_OS_API" = xposix; then
OPENJDK_TARGET_OS_API_DIR="solaris"
fi
if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
OPENJDK_TARGET_OS_API_DIR="windows"
fi
AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
A_LP64="LP64:="
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
# unpack200.exe
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
ADD_LP64="-D_LP64=1"
fi
fi
AC_SUBST(LP64,$A_LP64)
if test "x$COMPILE_TYPE" = "xcross"; then
# FIXME: ... or should this include reduced builds..?
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
else
DEFINE_CROSS_COMPILE_ARCH=""
fi
AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
])
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES], AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
[ [
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
@@ -315,7 +346,11 @@ AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
fi fi
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
REQUIRED_OS_NAME=Windows REQUIRED_OS_NAME=Windows
REQUIRED_OS_VERSION=5.1 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
REQUIRED_OS_VERSION=5.2
else
REQUIRED_OS_VERSION=5.1
fi
fi fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
REQUIRED_OS_NAME=Darwin REQUIRED_OS_NAME=Darwin
@@ -338,42 +373,10 @@ AC_CANONICAL_BUILD
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits], PLATFORM_EXTRACT_TARGET_AND_BUILD
[build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])]) PLATFORM_SETUP_TARGET_CPU_BITS
PLATFORM_SET_RELEASE_FILE_OS_VALUES
if test "x$with_target_bits" != x && \ PLATFORM_SETUP_LEGACY_VARS
test "x$with_target_bits" != x32 && \
test "x$with_target_bits" != x64 ; then
AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!])
fi
# Translate the standard cpu-vendor-kernel-os quadruplets into
# the new TARGET_.... and BUILD_... and the legacy names used by
# the openjdk build.
# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits
PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS
# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR.
if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then
LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}"
fi
# Now the following vars are defined.
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
# OPENJDK_TARGET_OS_API=posix,winapi
#
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
# OPENJDK_TARGET_CPU_BITS=32,64
# OPENJDK_TARGET_CPU_ENDIAN=big,little
#
# There is also a:
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,.... # used to set the old var ARCH
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH
# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
# There was also a BUILDARCH that had i486,amd64,... but we do not use that
# in the new build.
# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots
]) ])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
@@ -391,7 +394,26 @@ AC_SUBST(OS_VERSION_MINOR)
AC_SUBST(OS_VERSION_MICRO) AC_SUBST(OS_VERSION_MICRO)
]) ])
AC_DEFUN_ONCE([PLATFORM_TEST_OPENJDK_TARGET_BITS], # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
# Add -mX to various FLAGS variables.
AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
[
# keep track of c/cxx flags that we added outselves...
# to prevent emitting warning...
ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
[ [
############################################################################### ###############################################################################
# #
@@ -399,72 +421,47 @@ AC_DEFUN_ONCE([PLATFORM_TEST_OPENJDK_TARGET_BITS],
# (The JVM can use 32 or 64 bit Java pointers but that decision # (The JVM can use 32 or 64 bit Java pointers but that decision
# is made at runtime.) # is made at runtime.)
# #
AC_LANG_PUSH(C++) if test "x$OPENJDK_TARGET_OS" = xsolaris; then
OLD_CXXFLAGS="$CXXFLAGS" # Always specify -m flags on Solaris
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
CXXFLAGS="-m${with_target_bits} $CXXFLAGS" elif test "x$COMPILE_TYPE" = xreduced; then
if test "x$OPENJDK_TARGET_OS" != xwindows; then
# Specify -m if running reduced on other Posix platforms
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
fi
fi fi
# Make compilation sanity check
AC_CHECK_HEADERS([stdio.h], , [
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
if test "x$COMPILE_TYPE" = xreduced; then
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
elif test "x$COMPILE_TYPE" = xcross; then
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
fi
AC_MSG_ERROR([Cannot continue.])
])
AC_CHECK_SIZEOF([int *], [1111]) AC_CHECK_SIZEOF([int *], [1111])
CXXFLAGS="$OLD_CXXFLAGS"
AC_LANG_POP(C++)
# keep track of c/cxx flags that we added outselves... if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
# to prevent emitting warning... # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
ADDED_CFLAGS= SIZEOF_INT_P="$ac_cv_sizeof_int_p"
ADDED_CXXFLAGS= fi
ADDED_LDFLAGS=
if test "x$ac_cv_sizeof_int_p" = x0; then if test "x$SIZEOF_INT_P" = x; then
# The test failed, lets pick the assumed value. # The test failed, lets stick to the assumed value.
ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS AC_MSG_WARN([The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS.])
else else
ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p` TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
ADDED_CFLAGS=" -m${with_target_bits}" AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
ADDED_CXXFLAGS=" -m${with_target_bits}"
ADDED_LDFLAGS=" -m${with_target_bits}"
CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
fi fi
fi fi
if test "x$ARCH_DATA_MODEL" = x64; then
A_LP64="LP64:="
ADD_LP64="-D_LP64=1"
fi
AC_MSG_CHECKING([for target address size]) AC_MSG_CHECKING([for target address size])
AC_MSG_RESULT([$ARCH_DATA_MODEL bits]) AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits])
AC_SUBST(LP64,$A_LP64)
AC_SUBST(ARCH_DATA_MODEL)
if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then
AC_MSG_ERROR([The tested number of bits in the target ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
fi
#
# NOTE: check for -mstackrealign needs to be below potential addition of -m32
#
if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
# On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
# While waiting for a better solution, the current workaround is to use -mstackrealign.
CFLAGS="$CFLAGS -mstackrealign"
AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
[
AC_MSG_RESULT([yes])
],
[
AC_MSG_RESULT([no])
AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
])
fi
]) ])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
@@ -478,21 +475,7 @@ AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="univ
if test "x$ENDIAN" = xuniversal_endianness; then if test "x$ENDIAN" = xuniversal_endianness; then
AC_MSG_ERROR([Building with both big and little endianness is not supported]) AC_MSG_ERROR([Building with both big and little endianness is not supported])
fi fi
if test "x$ENDIAN" = xunknown; then
ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
fi
if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
AC_MSG_WARN([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)]) AC_MSG_ERROR([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
fi fi
AC_SUBST(ENDIAN)
])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ISADIR],
[
###############################################################################
#
# Could someone enlighten this configure script with a comment about libCrun?
#
#
]) ])

View File

@@ -250,31 +250,8 @@ fi
AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS], AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
[ [
LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools" BUILD_OUTPUT="$OUTPUT_ROOT"
CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba" AC_SUBST(BUILD_OUTPUT)
JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp"
JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws"
HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot"
JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
IMAGES_OUTPUTDIR="$OUTPUT_ROOT/images"
AC_SUBST(LANGTOOLS_OUTPUTDIR)
AC_SUBST(CORBA_OUTPUTDIR)
AC_SUBST(JAXP_OUTPUTDIR)
AC_SUBST(JAXWS_OUTPUTDIR)
AC_SUBST(HOTSPOT_OUTPUTDIR)
AC_SUBST(JDK_OUTPUTDIR)
AC_SUBST(IMAGES_OUTPUTDIR)
LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist"
CORBA_DIST="$OUTPUT_ROOT/corba/dist"
JAXP_DIST="$OUTPUT_ROOT/jaxp/dist"
JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist"
HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
AC_SUBST(LANGTOOLS_DIST)
AC_SUBST(CORBA_DIST)
AC_SUBST(JAXP_DIST)
AC_SUBST(JAXWS_DIST)
AC_SUBST(HOTSPOT_DIST)
]) ])

View File

@@ -23,7 +23,11 @@
# questions. # questions.
# #
# Configured @DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system, # Configured @DATE_WHEN_CONFIGURED@ to build
# for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@
# (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf)
# on build system @OPENJDK_BUILD_OS@-@OPENJDK_BUILD_CPU@
# (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
# using 'configure @CONFIGURE_COMMAND_LINE@' # using 'configure @CONFIGURE_COMMAND_LINE@'
# When calling macros, the spaces between arguments are # When calling macros, the spaces between arguments are
@@ -37,9 +41,18 @@ SQUOTE:='
#' #'
DQUOTE:=" DQUOTE:="
#" #"
define NEWLINE:= define NEWLINE
endef endef
# A self-referential reference to this file.
SPEC:=@SPEC@
# Specify where the spec file is.
MAKE_ARGS="SPEC=$(SPEC)"
MAKE:=@MAKE@
# Pass along the verbosity setting. # Pass along the verbosity setting.
ifeq (,$(findstring VERBOSE=,$(MAKE))) ifeq (,$(findstring VERBOSE=,$(MAKE)))
@@ -51,40 +64,38 @@ ifeq (,$(findstring -R,$(MAKE)))
MAKE:=$(MAKE) -R MAKE:=$(MAKE) -R
endif endif
# Specify where the spec file is.
ifeq (,$(findstring SPEC=,$(MAKE)))
MAKE:=$(MAKE) SPEC=@SPEC@
endif
# Specify where the common include directory for makefiles is. # Specify where the common include directory for makefiles is.
ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE))) ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
endif endif
# A self-referential reference to this file.
SPEC:=@SPEC@
# The "human readable" name of this configuration # The "human readable" name of this configuration
CONF_NAME:=@CONF_NAME@ CONF_NAME:=@CONF_NAME@
# The built jdk will run in this target system. # The built jdk will run in this target system.
OPENJDK_TARGET_SYSTEM:=@OPENJDK_TARGET_SYSTEM@
OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@ OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
OPENJDK_TARGET_OS_FAMILY:=@OPENJDK_TARGET_OS_FAMILY@
OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@ OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@ OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@ OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@ OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@ OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
COMPILE_TYPE:=@COMPILE_TYPE@
# Legacy support
OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@
OPENJDK_TARGET_CPU_LIBDIR:=@OPENJDK_TARGET_CPU_LIBDIR@
OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@
OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
OPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
# We are building on this build system. # We are building on this build system.
# When not cross-compiling, it is the same as the target. # When not cross-compiling, it is the same as the target.
OPENJDK_BUILD_SYSTEM:=@OPENJDK_BUILD_SYSTEM@
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@ OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
OPENJDK_BUILD_OS_FAMILY:=@OPENJDK_BUILD_OS_FAMILY@
OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@ OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@ OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
@@ -96,32 +107,22 @@ OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@ REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@ REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
PLATFORM:=@OPENJDK_TARGET_OS@
# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
ARCH:=@LEGACY_OPENJDK_TARGET_CPU1@
# Yet another name for arch used for an extra subdir below the jvm lib.
# Uses i386 and amd64, instead of ia32 and x64.
LIBARCH:=@LEGACY_OPENJDK_TARGET_CPU2@
# Use to switch between solaris and windows subdirs in the jdk.
LEGACY_OPENJDK_TARGET_OS_API:=@LEGACY_OPENJDK_TARGET_OS_API@
# 32 or 64 bit
ARCH_DATA_MODEL:=@OPENJDK_TARGET_CPU_BITS@
# Legacy setting for building for a 64 bit machine.
# If yes then this expands to _LP64:=1
@LP64@
ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
@SET_OPENJDK@ @SET_OPENJDK@
JIGSAW:=@JIGSAW@
LIBM:=-lm LIBM:=-lm
LIBDL:=@LIBDL@ LIBDL:=@LIBDL@
# colon or semicolon # colon or semicolon
PATH_SEP:=@PATH_SEP@ PATH_SEP:=@PATH_SEP@
# Set special env variables, to be passed to external tools. ifeq ($(OPENJDK_TARGET_OS), windows)
# Used for cygwin setups. # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE
@SETUPDEVENV@ # environment variables (in Windows path style), and the PATH needs to
# be adjusted to include Visual Studio tools (but this needs to be in
# cygwin/msys style).
export PATH:=@VS_PATH@
export INCLUDE:=@VS_INCLUDE@
export LIB:=@VS_LIB@
endif
# The sys root where standard headers and libraries are found. # The sys root where standard headers and libraries are found.
# Usually not needed since the configure script should have # Usually not needed since the configure script should have
@@ -134,7 +135,6 @@ ADD_SRC_ROOT:=@ADD_SRC_ROOT@
OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@ OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
TOPDIR:=@SRC_ROOT@ TOPDIR:=@SRC_ROOT@
OUTPUT_ROOT:=@OUTPUT_ROOT@ OUTPUT_ROOT:=@OUTPUT_ROOT@
JDK_MAKE_SHARED_DIR:=@JDK_TOPDIR@/makefiles/common/shared
JDK_TOPDIR:=@JDK_TOPDIR@ JDK_TOPDIR:=@JDK_TOPDIR@
LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@ LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
CORBA_TOPDIR:=@CORBA_TOPDIR@ CORBA_TOPDIR:=@CORBA_TOPDIR@
@@ -143,6 +143,9 @@ JAXWS_TOPDIR:=@JAXWS_TOPDIR@
HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@ HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@ COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
# Location where build customization files may be found
CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
# Information gathered from the version.numbers file. # Information gathered from the version.numbers file.
JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@ JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@ JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
@@ -155,6 +158,8 @@ PRODUCT_NAME:=@PRODUCT_NAME@
PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@ PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@ JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
COMPANY_NAME:=@COMPANY_NAME@ COMPANY_NAME:=@COMPANY_NAME@
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
# Different version strings generated from the above information. # Different version strings generated from the above information.
JDK_VERSION:=@JDK_VERSION@ JDK_VERSION:=@JDK_VERSION@
@@ -171,17 +176,12 @@ DEBUG_LEVEL:=@DEBUG_LEVEL@
# The JDK variant is a name for a specific set of modules to be compiled for the JDK. # The JDK variant is a name for a specific set of modules to be compiled for the JDK.
JDK_VARIANT:=@JDK_VARIANT@ JDK_VARIANT:=@JDK_VARIANT@
# Legacy defines controlling the JDK variant embedded.
@JAVASE_EMBEDDED@
@MINIMIZE_RAM_USAGE@
# Should we compile support for running with a graphical UI? (ie headful) # Should we compile support for running with a graphical UI? (ie headful)
# Should we compile support for running without? (ie headless) # Should we compile support for running without? (ie headless)
SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@ SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@ SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options. # Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
@BUILD_HEADLESS@ @BUILD_HEADLESS@
@BUILD_HEADLESS_ONLY@
# These are the libjvms that we want to build. # These are the libjvms that we want to build.
# The java launcher uses the default. # The java launcher uses the default.
@@ -194,53 +194,43 @@ JVM_VARIANT_KERNEL:=@JVM_VARIANT_KERNEL@
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@ JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@ JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
# Legacy setting: OPT or DBG # Universal binaries on macosx
VARIANT:=@VARIANT@ MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
# Legacy setting: true or false
FASTDEBUG:=@FASTDEBUG@
# Legacy setting: debugging the class files?
DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@
# Legacy setting: -debug or -fastdebug # Legacy setting: -debug or -fastdebug
# Still used in version string...
BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@ BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
LANGTOOLS_OUTPUTDIR:=@LANGTOOLS_OUTPUTDIR@ # JDK_OUTPUTDIR specifies where a working jvm is built.
CORBA_OUTPUTDIR:=@CORBA_OUTPUTDIR@
JAXP_OUTPUTDIR:=@JAXP_OUTPUTDIR@
JAXWS_OUTPUTDIR:=@JAXWS_OUTPUTDIR@
HOTSPOT_OUTPUTDIR:=@HOTSPOT_OUTPUTDIR@
# This where a working jvm is built.
# You can run $(JDK_OUTPUTDIR)/bin/java # You can run $(JDK_OUTPUTDIR)/bin/java
# Though the layout of the contents of $(JDK_OUTPUTDIR) is not # Though the layout of the contents of $(JDK_OUTPUTDIR) is not
# yet the same as a default installation. # yet the same as a default installation.
JDK_OUTPUTDIR:=@OUTPUT_ROOT@/jdk #
# When you run "make install" it will create the standardized # When you run "make install" it will create the standardized
# layout for the jdk and the jre inside the images subdir. # layout for the jdk and the jre inside the IMAGES_OUTPUTDIR subdir.
# Then it will copy the contents of the jdk into the installation # Then it will copy the contents of the jdk into the installation
# directory. # directory.
IMAGES_OUTPUTDIR:=@OUTPUT_ROOT@/images
LANGTOOLS_DIST:=@LANGTOOLS_DIST@ BUILD_OUTPUT:=@BUILD_OUTPUT@
CORBA_DIST:=@CORBA_DIST@ LANGTOOLS_OUTPUTDIR=$(BUILD_OUTPUT)/langtools
JAXP_DIST:=@JAXP_DIST@ CORBA_OUTPUTDIR=$(BUILD_OUTPUT)/corba
JAXWS_DIST:=@JAXWS_DIST@ JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp
HOTSPOT_DIST:=@HOTSPOT_DIST@ JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
# Legacy variables used by Release.gmk LANGTOOLS_DIST=$(LANGTOOLS_OUTPUTDIR)/dist
JDK_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2sdk-image CORBA_DIST=$(CORBA_OUTPUTDIR)/dist
JRE_IMAGE_DIR:=$(IMAGES_OUTPUTDIR)/j2re-image JAXP_DIST=$(JAXP_OUTPUTDIR)/dist
JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
# Can be /sparcv9 or /amd64 on Solaris HOTSPOT_DIST=$(HOTSPOT_OUTPUTDIR)/dist
ISA_DIR:=@LEGACY_OPENJDK_TARGET_CPU3@
BINDIR:=$(JDK_OUTPUTDIR)/bin$(ISA_DIR)
# The boot jdk to use # The boot jdk to use
ALT_BOOTDIR:=@BOOT_JDK@
BOOT_JDK:=@BOOT_JDK@ BOOT_JDK:=@BOOT_JDK@
BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@ BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
BOOT_RTJAR:=@BOOT_RTJAR@ BOOT_RTJAR:=@BOOT_RTJAR@
BOOT_TOOLSJAR:=@BOOT_TOOLSJAR@ BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
# When compiling Java source to be run by the boot jdk # When compiling Java source to be run by the boot jdk
# use these extra flags, eg -source 6 -target 6 # use these extra flags, eg -source 6 -target 6
@@ -248,30 +238,18 @@ BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
# Information about the build system # Information about the build system
NUM_CORES:=@NUM_CORES@ NUM_CORES:=@NUM_CORES@
# This is used from the jdk build for C/C++ code. # Enable sjavac support = use a javac server,
PARALLEL_COMPILE_JOBS:=@CONCURRENT_BUILD_JOBS@ # multi core javac compilation and dependency tracking.
# Store javac server synchronization files here, and ENABLE_SJAVAC:=@ENABLE_SJAVAC@
# the javac server log files. # Store sjavac server synchronization files here, and
JAVAC_SERVERS:=@JAVAC_SERVERS@ # the sjavac server log files.
# Should we use a javac server or not? The javac server gives SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
# an enormous performance improvement since it reduces the
# startup costs of javac and reuses as much as possible of intermediate
# compilation work. But if we want to compile with a non-Java
# javac compiler, like gcj. Then we cannot use javac server and
# this variable is set to false.
JAVAC_USE_REMOTE:=@JAVAC_USE_REMOTE@
# We can block the Javac server to never use more cores than this. # We can block the Javac server to never use more cores than this.
# This is not for performance reasons, but for memory usage, since each # This is not for performance reasons, but for memory usage, since each
# core requires its own JavaCompiler. We might have 64 cores and 4GB # core requires its own JavaCompiler. We might have 64 cores and 4GB
# of memory, 64 JavaCompilers will currently not fit in a 3GB heap. # of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
# Since there is no sharing of data between the JavaCompilers. # Since there is no sharing of data between the JavaCompilers.
JAVAC_SERVER_CORES:=@JAVAC_SERVER_CORES@ SJAVAC_SERVER_CORES:=@SJAVAC_SERVER_CORES@
# Should we use dependency tracking between Java packages? true or false.
JAVAC_USE_DEPS:=@JAVAC_USE_DEPS@
# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
JAVAC_USE_MODE:=@JAVAC_USE_MODE@
# Enable not yet complete sjavac support.
ENABLE_SJAVAC:=@ENABLE_SJAVAC@
# The OpenJDK makefiles should be changed to using the standard # The OpenJDK makefiles should be changed to using the standard
# configure output ..._CFLAGS and ..._LIBS. In the meantime we # configure output ..._CFLAGS and ..._LIBS. In the meantime we
@@ -280,7 +258,6 @@ FREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@
FREETYPE2_LIBS:=@FREETYPE2_LIBS@ FREETYPE2_LIBS:=@FREETYPE2_LIBS@
FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@ FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@
USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@ USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@
ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
CUPS_CFLAGS:=@CUPS_CFLAGS@ CUPS_CFLAGS:=@CUPS_CFLAGS@
PACKAGE_PATH=@PACKAGE_PATH@ PACKAGE_PATH=@PACKAGE_PATH@
@@ -288,7 +265,8 @@ PACKAGE_PATH=@PACKAGE_PATH@
# Source file for cacerts # Source file for cacerts
CACERTS_FILE=@CACERTS_FILE@ CACERTS_FILE=@CACERTS_FILE@
#MOZILLA_HEADERS_PATH:= # Enable unlimited crypto policy
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
# Necessary additional compiler flags to compile X11 # Necessary additional compiler flags to compile X11
X_CFLAGS:=@X_CFLAGS@ X_CFLAGS:=@X_CFLAGS@
@@ -319,7 +297,7 @@ C_FLAG_DEPS:=@C_FLAG_DEPS@
CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@ CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
# Tools that potentially need to be cross compilation aware. # Tools that potentially need to be cross compilation aware.
CC:=@UNCYGDRIVE@ @CCACHE@ @CC@ CC:=@FIXPATH@ @CCACHE@ @CC@
# CFLAGS used to compile the jdk native libraries (C-code) # CFLAGS used to compile the jdk native libraries (C-code)
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@ CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
@@ -329,17 +307,17 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@ CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@ CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
CXX:=@UNCYGDRIVE@ @CCACHE@ @CXX@ CXX:=@FIXPATH@ @CCACHE@ @CXX@
#CXXFLAGS:=@CXXFLAGS@ #CXXFLAGS:=@CXXFLAGS@
OBJC:=@CCACHE@ @OBJC@ OBJC:=@CCACHE@ @OBJC@
#OBJCFLAGS:=@OBJCFLAGS@ #OBJCFLAGS:=@OBJCFLAGS@
CPP:=@UNCYGDRIVE@ @CPP@ CPP:=@FIXPATH@ @CPP@
#CPPFLAGS:=@CPPFLAGS@ #CPPFLAGS:=@CPPFLAGS@
# The linker can be gcc or ld on posix systems, or link.exe on winapi systems. # The linker can be gcc or ld on posix systems, or link.exe on windows systems.
LD:=@UNCYGDRIVE@ @LD@ LD:=@FIXPATH@ @LD@
# LDFLAGS used to link the jdk native libraries (C-code) # LDFLAGS used to link the jdk native libraries (C-code)
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@ LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
@@ -347,42 +325,39 @@ LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
# On some platforms the linker cannot be used to create executables, thus # On some platforms the linker cannot be used to create executables, thus
# the need for a separate LDEXE command. # the need for a separate LDEXE command.
LDEXE:=@UNCYGDRIVE@ @LDEXE@ LDEXE:=@FIXPATH@ @LDEXE@
# LDFLAGS used to link the jdk native launchers (C-code) # LDFLAGS used to link the jdk native launchers (C-code)
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@ LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@ LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
# LDFLAGS specific to C++ linking.
LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
# Sometimes a different linker is needed for c++ libs # Sometimes a different linker is needed for c++ libs
LDCXX:=@UNCYGDRIVE@ @LDCXX@ LDCXX:=@FIXPATH@ @LDCXX@
# The flags for linking libstdc++ linker. # The flags for linking libstdc++ linker.
LIBCXX:=@LIBCXX@ LIBCXX:=@LIBCXX@
# Sometimes a different linker is needed for c++ executables # Sometimes a different linker is needed for c++ executables
LDEXECXX:=@UNCYGDRIVE@ @LDEXECXX@ LDEXECXX:=@FIXPATH@ @LDEXECXX@
# If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here. # BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
@DEFINE_CROSS_COMPILE_ARCH@ # build platform.
# The HOSTCC should really be named BUILDCC, ie build executable for BUILD_CC:=@FIXPATH@ @BUILD_CC@
# the build platform. Same as CC when not cross compiling. BUILD_LD:=@FIXPATH@ @BUILD_LD@
HOSTCC:=@UNCYGDRIVE@ @HOSTCC@
HOSTCXX:=@UNCYGDRIVE@ @HOSTCXX@
# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC
HOST_CC:=@UNCYGDRIVE@ @HOSTCC@
NIO_CC:=@UNCYGDRIVE@ @HOSTCC@
HOST_LD:=@UNCYGDRIVE@ @HOSTLD@ AS:=@FIXPATH@ @AS@
AS:=@UNCYGDRIVE@ @AS@ # AR is used to create a static library (is ar in posix, lib.exe in windows)
ASFLAGS:=@ASFLAGS@ AR:=@FIXPATH@ @AR@
# AR is used to create a static library (is ar in posix, lib.exe in winapi)
AR:=@UNCYGDRIVE@ @AR@
ARFLAGS:=@ARFLAGS@ ARFLAGS:=@ARFLAGS@
NM:=@UNCYGDRIVE@ @NM@ NM:=@NM@
STRIP:=@UNCYGDRIVE@ @STRIP@ STRIP:=@STRIP@
MCS:=@UNCYGDRIVE@ @MCS@ MCS:=@MCS@
LIPO:=@LIPO@
# Command to create a shared library # Command to create a shared library
SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@ SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
@@ -414,6 +389,7 @@ SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
# Set origin using the linker, ie use the relative path to the dependent library to find the dependees. # Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
# (Note absence of := assignment, because we do not want to evaluate the macro body here) # (Note absence of := assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@ SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
# Different OS:es have different ways of naming shared libraries. # Different OS:es have different ways of naming shared libraries.
# The SHARED_LIBRARY macro takes "verify" as and argument and returns: # The SHARED_LIBRARY macro takes "verify" as and argument and returns:
@@ -432,21 +408,20 @@ POST_MCS_CMD:=@POST_MCS_CMD@
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@ JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
JAVA=@UNCYGDRIVE@ @JAVA@ $(JAVA_FLAGS) JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
JAVAC:=@UNCYGDRIVE@ @JAVAC@ JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
JAVAC_FLAGS:=@JAVAC_FLAGS@ # Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
# overriding that value by using ?=.
JAVAC_FLAGS?=@JAVAC_FLAGS@
JAVAH:=@UNCYGDRIVE@ @JAVAH@ JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah
JAR:=@UNCYGDRIVE@ @JAR@ JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
RMIC:=@UNCYGDRIVE@ @RMIC@ RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
NATIVE2ASCII:=@UNCYGDRIVE@ @NATIVE2ASCII@ NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
BOOT_JAR_CMD:=@UNCYGDRIVE@ @JAR@
BOOT_JAR_JFLAGS:=
# Base flags for RC # Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple # Guarding this against resetting value. Legacy make files include spec multiple
@@ -456,21 +431,21 @@ RC_FLAGS:=@RC_FLAGS@
endif endif
# A specific java binary with specific options can be used to run # A specific java binary with specific options can be used to run
# the long running background javac server and other long running tasks. # the long running background sjavac servers and other long running tasks.
SERVER_JAVA:=@UNCYGDRIVE@ @SERVER_JAVA@ SJAVAC_SERVER_JAVA:=@FIXPATH@ @SJAVAC_SERVER_JAVA@
# Tools adhering to a minimal and common standard of posix compliance. # Tools adhering to a minimal and common standard of posix compliance.
AWK:=@AWK@ AWK:=@AWK@
BASENAME:=@BASENAME@
BASH:=@BASH@
CAT:=@CAT@ CAT:=@CAT@
CCACHE:=@CCACHE@ CCACHE:=@CCACHE@
# CD is going away, but remains to cater for legacy makefiles. # CD is going away, but remains to cater for legacy makefiles.
CD:=cd CD:=cd
CHMOD:=@CHMOD@ CHMOD:=@CHMOD@
CP:=@CP@ CP:=@CP@
CPIO:=@CPIO@
CUT:=@CUT@ CUT:=@CUT@
DATE:=@DATE@ DATE:=@DATE@
DF:=@DF@
DIFF:=@DIFF@ DIFF:=@DIFF@
FIND:=@FIND@ FIND:=@FIND@
FIND_DELETE:=@FIND_DELETE@ FIND_DELETE:=@FIND_DELETE@
@@ -493,6 +468,7 @@ SORT:=@SORT@
TAR:=@TAR@ TAR:=@TAR@
TAIL:=@TAIL@ TAIL:=@TAIL@
TEE:=@TEE@ TEE:=@TEE@
TIME:=@TIME@
TR:=@TR@ TR:=@TR@
TOUCH:=@TOUCH@ TOUCH:=@TOUCH@
WC:=@WC@ WC:=@WC@
@@ -500,9 +476,9 @@ XARGS:=@XARGS@
ZIPEXE:=@ZIP@ ZIPEXE:=@ZIP@
ZIP:=@ZIP@ ZIP:=@ZIP@
UNZIP:=@UNZIP@ UNZIP:=@UNZIP@
MT:=@UNCYGDRIVE@ @MT@ MT:=@FIXPATH@ @MT@
RC:=@UNCYGDRIVE@ @RC@ RC:=@FIXPATH@ @RC@
DUMPBIN:=@UNCYGDRIVE@ @DUMPBIN@ DUMPBIN:=@FIXPATH@ @DUMPBIN@
CYGPATH:=@CYGPATH@ CYGPATH:=@CYGPATH@
LDD:=@LDD@ LDD:=@LDD@
OTOOL:=@OTOOL@ OTOOL:=@OTOOL@
@@ -511,8 +487,9 @@ EXPR:=@EXPR@
FILE:=@FILE@ FILE:=@FILE@
HG:=@HG@ HG:=@HG@
OBJCOPY:=@OBJCOPY@ OBJCOPY:=@OBJCOPY@
SETFILE:=@SETFILE@
UNCYGDRIVE:=@UNCYGDRIVE@ FIXPATH:=@FIXPATH@
# Where the build output is stored for your convenience. # Where the build output is stored for your convenience.
BUILD_LOG:=@BUILD_LOG@ BUILD_LOG:=@BUILD_LOG@
@@ -520,16 +497,12 @@ BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@ BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
# Build setup # Build setup
ENABLE_DOCS:=@ENABLE_DOCS@
GENERATE_DOCS:=@ENABLE_DOCS@
DISABLE_NIMBUS:=@DISABLE_NIMBUS@
ENABLE_JFR=@ENABLE_JFR@ ENABLE_JFR=@ENABLE_JFR@
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@ USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@ LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
CHECK_FOR_VCINSTALLDIR=@CHECK_FOR_VCINSTALLDIR@ MSVCR_DLL:=@MSVCR_DLL@
MSVCRNN_DLL:=@MSVCR100DLL@
# ADD_SRCS takes a single argument with source roots # ADD_SRCS takes a single argument with source roots
@@ -559,17 +532,6 @@ else
OVR_SRCS:= OVR_SRCS:=
endif endif
####################################################
#
# Legacy Hotspot support
HOTSPOT_DIST:=@HOTSPOT_DIST@
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@
# This is used from the libjvm build for C/C++ code.
HOTSPOT_BUILD_JOBS:=@CONCURRENT_BUILD_JOBS@
# Control wether Hotspot runs Queens test after building
TEST_IN_BUILD=@TEST_IN_BUILD@
#################################################### ####################################################
# #
# INSTALLATION # INSTALLATION
@@ -634,5 +596,5 @@ OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
OS_VERSION_MINOR:=@OS_VERSION_MINOR@ OS_VERSION_MINOR:=@OS_VERSION_MINOR@
OS_VERSION_MICRO:=@OS_VERSION_MICRO@ OS_VERSION_MICRO:=@OS_VERSION_MICRO@
# Include the closed-spec.gmk file if it exists # Include the custom-spec.gmk file if it exists
-include $(dir @SPEC@)/closed-spec.gmk -include $(dir @SPEC@)/custom-spec.gmk

View File

@@ -23,505 +23,14 @@
# questions. # questions.
# #
# Configured"@DATE_WHEN_CONFIGURED@ to build for a @OPENJDK_TARGET_SYSTEM@ system,
# using 'configure @CONFIGURE_COMMAND_LINE@'
# The "human readable" name of this configuration
CONF_NAME="@CONF_NAME@"
# The built jdk will run in this target system.
OPENJDK_TARGET_SYSTEM="@OPENJDK_TARGET_SYSTEM@"
OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
OPENJDK_TARGET_OS_FAMILY="@OPENJDK_TARGET_OS_FAMILY@"
OPENJDK_TARGET_OS_API="@OPENJDK_TARGET_OS_API@"
OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
OPENJDK_TARGET_CPU_ARCH="@OPENJDK_TARGET_CPU_ARCH@"
OPENJDK_TARGET_CPU_BITS="@OPENJDK_TARGET_CPU_BITS@"
OPENJDK_TARGET_CPU_ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
# We are building on this build system.
# When not cross-compiling, it is the same as the target.
OPENJDK_BUILD_SYSTEM="@OPENJDK_BUILD_SYSTEM@"
OPENJDK_BUILD_OS="@OPENJDK_BUILD_OS@"
OPENJDK_BUILD_OS_FAMILY="@OPENJDK_BUILD_OS_FAMILY@"
OPENJDK_BUILD_OS_API="@OPENJDK_BUILD_OS_API@"
OPENJDK_BUILD_CPU="@OPENJDK_BUILD_CPU@"
OPENJDK_BUILD_CPU_ARCH="@OPENJDK_BUILD_CPU_ARCH@"
OPENJDK_BUILD_CPU_BITS="@OPENJDK_BUILD_CPU_BITS@"
OPENJDK_BUILD_CPU_ENDIAN="@OPENJDK_BUILD_CPU_ENDIAN@"
# Legacy OS values for use in release file.
REQUIRED_OS_NAME="@REQUIRED_OS_NAME@"
REQUIRED_OS_VERSION="@REQUIRED_OS_VERSION@"
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
PLATFORM="@OPENJDK_TARGET_OS@"
# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of ia32 and x64.
ARCH="@LEGACY_OPENJDK_TARGET_CPU1@"
# Yet another name for arch used for an extra subdir below the jvm lib.
# Uses i386 and amd64, instead of ia32 and x64.
LIBARCH="@LEGACY_OPENJDK_TARGET_CPU2@"
# Use to switch between solaris and windows subdirs in the jdk.
LEGACY_OPENJDK_TARGET_OS_API="@LEGACY_OPENJDK_TARGET_OS_API@"
# 32 or 64 bit
ARCH_DATA_MODEL="@OPENJDK_TARGET_CPU_BITS@"
# Legacy setting for building for a 64 bit machine.
# If yes then this expands to _LP64=1
ENDIAN="@OPENJDK_TARGET_CPU_ENDIAN@"
JIGSAW="@JIGSAW@"
LIBM=-lm
LIBDL="@LIBDL@"
# colon or semicolon
PATH_SEP="@PATH_SEP@"
# The sys root where standard headers and libraries are found.
# Usually not needed since the configure script should have
# taken it into account already when setting CFLAGS et al.
SYS_ROOT="@SYS_ROOT@"
# Paths to the source code
SRC_ROOT="@SRC_ROOT@"
ADD_SRC_ROOT="@ADD_SRC_ROOT@"
OVERRIDE_SRC_ROOT="@OVERRIDE_SRC_ROOT@"
TOPDIR="@SRC_ROOT@"
OUTPUT_ROOT="@OUTPUT_ROOT@"
JDK_MAKE_SHARED_DIR="@JDK_TOPDIR@"/makefiles/common/shared
JDK_TOPDIR="@JDK_TOPDIR@"
LANGTOOLS_TOPDIR="@LANGTOOLS_TOPDIR@"
CORBA_TOPDIR="@CORBA_TOPDIR@"
JAXP_TOPDIR="@JAXP_TOPDIR@"
JAXWS_TOPDIR="@JAXWS_TOPDIR@"
HOTSPOT_TOPDIR="@HOTSPOT_TOPDIR@"
COPYRIGHT_YEAR="@COPYRIGHT_YEAR@"
# Information gathered from the version.numbers file.
JDK_MAJOR_VERSION="@JDK_MAJOR_VERSION@"
JDK_MINOR_VERSION="@JDK_MINOR_VERSION@"
JDK_MICRO_VERSION="@JDK_MICRO_VERSION@"
JDK_UPDATE_VERSION="@JDK_UPDATE_VERSION@"
JDK_BUILD_NUMBER="@JDK_BUILD_NUMBER@"
MILESTONE="@MILESTONE@"
LAUNCHER_NAME="@LAUNCHER_NAME@"
PRODUCT_NAME="@PRODUCT_NAME@"
PRODUCT_SUFFIX="@PRODUCT_SUFFIX@"
JDK_RC_PLATFORM_NAME="@JDK_RC_PLATFORM_NAME@"
COMPANY_NAME="@COMPANY_NAME@"
# Different version strings generated from the above information.
JDK_VERSION="@JDK_VERSION@"
RUNTIME_NAME="@RUNTIME_NAME@"
FULL_VERSION="@FULL_VERSION@"
JRE_RELEASE_VERSION="@FULL_VERSION@"
RELEASE="@RELEASE@"
COOKED_BUILD_NUMBER="@COOKED_BUILD_NUMBER@"
# How to compile the code: release, fastdebug or slowdebug
DEBUG_LEVEL="@DEBUG_LEVEL@"
# This is the JDK variant to build.
# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
JDK_VARIANT="@JDK_VARIANT@"
# Should we compile support for running with a graphical UI? (ie headful)
# Should we compile support for running without? (ie headless)
SUPPORT_HEADFUL="@SUPPORT_HEADFUL@"
SUPPORT_HEADLESS="@SUPPORT_HEADLESS@"
# These are the libjvms that we want to build.
# The java launcher uses the default.
# The other can be selected by specifying -client -server -kernel -zero or -zeroshark
# on the java launcher command line.
JVM_VARIANTS="@JVM_VARIANTS@"
JVM_VARIANT_SERVER="@JVM_VARIANT_SERVER@"
JVM_VARIANT_CLIENT="@JVM_VARIANT_CLIENT@"
JVM_VARIANT_KERNEL="@JVM_VARIANT_KERNEL@"
JVM_VARIANT_ZERO="@JVM_VARIANT_ZERO@"
JVM_VARIANT_ZEROSHARK="@JVM_VARIANT_ZEROSHARK@"
# Legacy setting: OPT or DBG
VARIANT="@VARIANT@"
# Legacy setting: true or false
FASTDEBUG="@FASTDEBUG@"
# Legacy setting: debugging the class files?
DEBUG_CLASSFILES="@DEBUG_CLASSFILES@"
# Legacy setting: -debug or -fastdebug
BUILD_VARIANT_RELEASE="@BUILD_VARIANT_RELEASE@"
LANGTOOLS_OUTPUTDIR="@LANGTOOLS_OUTPUTDIR@"
CORBA_OUTPUTDIR="@CORBA_OUTPUTDIR@"
JAXP_OUTPUTDIR="@JAXP_OUTPUTDIR@"
JAXWS_OUTPUTDIR="@JAXWS_OUTPUTDIR@"
HOTSPOT_OUTPUTDIR="@HOTSPOT_OUTPUTDIR@"
# This where a working jvm is built.
# You can run ${JDK_OUTPUTDIR}/bin/java
# Though the layout of the contents of ${JDK_OUTPUTDIR} is not
# yet the same as a default installation.
JDK_OUTPUTDIR="@OUTPUT_ROOT@"/jdk
# When you run "make install" it will create the standardized
# layout for the jdk and the jre inside the images subdir.
# Then it will copy the contents of the jdk into the installation
# directory.
IMAGES_OUTPUTDIR="@OUTPUT_ROOT@"/images
LANGTOOLS_DIST="@LANGTOOLS_DIST@"
CORBA_DIST="@CORBA_DIST@"
JAXP_DIST="@JAXP_DIST@"
JAXWS_DIST="@JAXWS_DIST@"
HOTSPOT_DIST="@HOTSPOT_DIST@"
# Legacy variables used by Release.gmk
JDK_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2sdk-image
JRE_IMAGE_DIR=${IMAGES_OUTPUTDIR}/j2re-image
# Can be /sparcv9 or /amd64 on Solaris
ISA_DIR="@LEGACY_OPENJDK_TARGET_CPU3@"
BINDIR="${JDK_OUTPUTDIR}/bin${ISA_DIR}"
# The boot jdk to use
ALT_BOOTDIR="@BOOT_JDK@"
BOOT_JDK="@BOOT_JDK@"
BOOT_JDK_JVMARGS="@BOOT_JDK_JVMARGS@"
BOOT_RTJAR="@BOOT_RTJAR@"
BOOT_TOOLSJAR="@BOOT_TOOLSJAR@"
# When compiling Java source to be run by the boot jdk
# use these extra flags, eg -source 6 -target 6
BOOT_JDK_SOURCETARGET="@BOOT_JDK_SOURCETARGET@"
# Information about the build system
NUM_CORES="@NUM_CORES@"
# This is used from the jdk build for C/C++ code.
PARALLEL_COMPILE_JOBS="@CONCURRENT_BUILD_JOBS@"
# Store javac server synchronization files here, and
# the javac server log files.
JAVAC_SERVERS="@JAVAC_SERVERS@"
# Should we use a javac server or not? The javac server gives
# an enormous performance improvement since it reduces the
# startup costs of javac and reuses as much as possible of intermediate
# compilation work. But if we want to compile with a non-Java
# javac compiler, like gcj. Then we cannot use javac server and
# this variable is set to false.
JAVAC_USE_REMOTE="@JAVAC_USE_REMOTE@"
# We can block the Javac server to never use more cores than this.
# This is not for performance reasons, but for memory usage, since each
# core requires its own JavaCompiler. We might have 64 cores and 4GB
# of memory, 64 JavaCompilers will currently not fit in a 3GB heap.
# Since there is no sharing of data between the JavaCompilers.
JAVAC_SERVER_CORES="@JAVAC_SERVER_CORES@"
# Should we use dependency tracking between Java packages? true or false.
JAVAC_USE_DEPS="@JAVAC_USE_DEPS@"
# We can invoke javac: SINGLE_THREADED_BATCH or MULTI_CORE_CONCURRENT
JAVAC_USE_MODE="@JAVAC_USE_MODE@"
# Enable not yet complete sjavac support.
ENABLE_SJAVAC="@ENABLE_SJAVAC@"
# The OpenJDK makefiles should be changed to using the standard
# configure output ..._CFLAGS and ..._LIBS. In the meantime we
# extract the information here.
FREETYPE2_LIB_PATH="@FREETYPE2_LIB_PATH@"
FREETYPE2_LIBS="@FREETYPE2_LIBS@"
FREETYPE2_CFLAGS="@FREETYPE2_CFLAGS@"
USING_SYSTEM_FT_LIB="@USING_SYSTEM_FT_LIB@"
CUPS_CFLAGS="@CUPS_CFLAGS@"
PACKAGE_PATH="@PACKAGE_PATH@"
# Source file for cacerts
CACERTS_FILE="@CACERTS_FILE@"
#MOZILLA_HEADERS_PATH=
# Necessary additional compiler flags to compile X11
X_CFLAGS="@X_CFLAGS@"
X_LIBS="@X_LIBS@"
OPENWIN_HOME="@OPENWIN_HOME@"
# There are two types: CC or CL
# CC is gcc and others behaving reasonably similar.
# CL is cl.exe only.
COMPILER_TYPE="@COMPILER_TYPE@"
# Flags used for overriding the default opt setting for a C/C++ source file.
C_O_FLAG_HIGHEST="@C_O_FLAG_HIGHEST@"
C_O_FLAG_HI="@C_O_FLAG_HI@"
C_O_FLAG_NORM="@C_O_FLAG_NORM@"
C_O_FLAG_NONE="@C_O_FLAG_NONE@"
CXX_O_FLAG_HIGHEST="@CXX_O_FLAG_HIGHEST@"
CXX_O_FLAG_HI="@CXX_O_FLAG_HI@"
CXX_O_FLAG_NORM="@CXX_O_FLAG_NORM@"
CXX_O_FLAG_NONE="@CXX_O_FLAG_NONE@"
C_FLAG_DEPS="@C_FLAG_DEPS@"
CXX_FLAG_DEPS="@CXX_FLAG_DEPS@"
# Tools that potentially need to be cross compilation aware.
CC="@UNCYGDRIVE@ @CCACHE@ @CC@"
# CFLAGS used to compile the jdk native libraries (C-code)
CFLAGS_JDKLIB="@CFLAGS_JDKLIB@"
CXXFLAGS_JDKLIB="@CXXFLAGS_JDKLIB@"
# CFLAGS used to compile the jdk native launchers (C-code)
CFLAGS_JDKEXE="@CFLAGS_JDKEXE@"
CXXFLAGS_JDKEXE="@CXXFLAGS_JDKEXE@"
CXX="@UNCYGDRIVE@ @CCACHE@ @CXX@"
#CXXFLAGS="@CXXFLAGS@"
OBJC="@CCACHE@ @OBJC@"
#OBJCFLAGS="@OBJCFLAGS@"
CPP="@UNCYGDRIVE@ @CPP@"
#CPPFLAGS="@CPPFLAGS@"
# The linker can be gcc or ld on posix systems, or link.exe on winapi systems.
LD="@UNCYGDRIVE@ @LD@"
# LDFLAGS used to link the jdk native libraries (C-code)
LDFLAGS_JDKLIB="@LDFLAGS_JDKLIB@"
LDFLAGS_JDKLIB_SUFFIX="@LDFLAGS_JDKLIB_SUFFIX@"
# On some platforms the linker cannot be used to create executables, thus
# the need for a separate LDEXE command.
LDEXE="@UNCYGDRIVE@ @LDEXE@"
# LDFLAGS used to link the jdk native launchers (C-code)
LDFLAGS_JDKEXE="@LDFLAGS_JDKEXE@"
LDFLAGS_JDKEXE_SUFFIX="@LDFLAGS_JDKEXE_SUFFIX@"
# Sometimes a different linker is needed for c++ libs
LDCXX="@UNCYGDRIVE@ @LDCXX@"
# The flags for linking libstdc++ linker.
LIBCXX="@LIBCXX@"
# Sometimes a different linker is needed for c++ executables
LDEXECXX="@UNCYGDRIVE@ @LDEXECXX@"
# If cross compiling, then define CROSS_COMPILE_ARCH=cpu_name here.
# The HOSTCC should really be named BUILDCC, ie build executable for
# the build platform. Same as CC when not cross compiling.
HOSTCC="@HOSTCC@"
HOSTCXX="@HOSTCXX@"
# And of course, the jdk spells HOSTCC as NIO_CC/HOST_CC
HOST_CC="@HOSTCC@"
NIO_CC="@HOSTCC@"
AS="@AS@"
ASFLAGS="@ASFLAGS@"
# AR is used to create a static library (is ar in posix, lib.exe in winapi)
AR="@UNCYGDRIVE@ @AR@"
ARFLAGS="@ARFLAGS@"
NM="@NM@"
STRIP="@STRIP@"
MCS="@MCS@"
# Command to create a shared library
SHARED_LIBRARY_FLAGS="@SHARED_LIBRARY_FLAGS@"
# Options to linker to specify a mapfile.
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_MAPFILE="@SET_SHARED_LIBRARY_MAPFILE@"
# Options for C/CXX compiler to be used if linking is performed
# using reorder file
C_FLAG_REORDER="@C_FLAG_REORDER@"
CXX_FLAG_REORDER="@CXX_FLAG_REORDER@"
#
# Options for generating debug symbols
ENABLE_DEBUG_SYMBOLS="@ENABLE_DEBUG_SYMBOLS@"
CFLAGS_DEBUG_SYMBOLS="@CFLAGS_DEBUG_SYMBOLS@"
CXXFLAGS_DEBUG_SYMBOLS="@CXXFLAGS_DEBUG_SYMBOLS@"
ZIP_DEBUGINFO_FILES="@ZIP_DEBUGINFO_FILES@"
# Options to linker to specify the library name.
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_NAME="@SET_SHARED_LIBRARY_NAME@"
# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_ORIGIN="@SET_SHARED_LIBRARY_ORIGIN@"
# Different OS:es have different ways of naming shared libraries.
# The SHARED_LIBRARY macro takes "verify" as and argument and returns:
# "libverify.so" or "libverify.dylib" or "verify.dll" depending on platform.
# (Note absence of = assignment, because we do not want to evaluate the macro body here)
SHARED_LIBRARY="@SHARED_LIBRARY@"
STATIC_LIBRARY="@STATIC_LIBRARY@"
LIBRARY_PREFIX="@LIBRARY_PREFIX@"
SHARED_LIBRARY_SUFFIX="@SHARED_LIBRARY_SUFFIX@"
STATIC_LIBRARY_SUFFIX="@STATIC_LIBRARY_SUFFIX@"
EXE_SUFFIX="@EXE_SUFFIX@"
OBJ_SUFFIX="@OBJ_SUFFIX@"
POST_STRIP_CMD="@POST_STRIP_CMD@"
POST_MCS_CMD='@POST_MCS_CMD@'
JAVA_FLAGS="@BOOT_JDK_JVMARGS@"
JAVA="@UNCYGDRIVE@ @JAVA@ ${JAVA_FLAGS}"
JAVAC="@UNCYGDRIVE@ @JAVAC@"
JAVAC_FLAGS="@JAVAC_FLAGS@"
JAVAH="@UNCYGDRIVE@ @JAVAH@"
JAR="@UNCYGDRIVE@ @JAR@"
RMIC="@UNCYGDRIVE@ @RMIC@"
NATIVE2ASCII="@UNCYGDRIVE@ @NATIVE2ASCII@"
BOOT_JAR_CMD="@UNCYGDRIVE@ @JAR@"
BOOT_JAR_JFLAGS=
# Tools adhering to a minimal and common standard of posix compliance.
AWK="@AWK@"
CAT="@CAT@" CAT="@CAT@"
CCACHE="@CCACHE@"
# CD is going away, but remains to cater for legacy makefiles.
CD=cd CD=cd
CHMOD="@CHMOD@"
CP="@CP@" CP="@CP@"
CPIO="@CPIO@"
CUT="@CUT@"
DATE="@DATE@"
DF="@DF@"
DIFF="@DIFF@" DIFF="@DIFF@"
FIND="@FIND@"
FIND_DELETE="@FIND_DELETE@"
ECHO="@ECHO@" ECHO="@ECHO@"
EGREP="@EGREP@" FIND="@FIND@"
FGREP="@FGREP@"
GREP="@GREP@" GREP="@GREP@"
HEAD="@HEAD@"
LS="@LS@"
LN="@LN@"
MKDIR="@MKDIR@"
MV="@MV@"
NAWK="@NAWK@"
PRINTF="@PRINTF@"
PWD="@THEPWDCMD@"
RM="@RM@" RM="@RM@"
SED="@SED@" SED="@SED@"
SH="@SH@"
SORT="@SORT@"
TAR="@TAR@"
TAIL="@TAIL@"
TEE="@TEE@"
TR="@TR@"
TOUCH="@TOUCH@"
WC="@WC@"
XARGS="@XARGS@"
ZIPEXE="@ZIP@"
ZIP="@ZIP@"
UNZIP="@UNZIP@"
MT="@UNCYGDRIVE@ @MT@"
RC="@UNCYGDRIVE@ @RC@"
DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@"
CYGPATH="@CYGPATH@"
LDD="@LDD@"
OTOOL="@OTOOL@"
READELF="@READELF@"
EXPR="@EXPR@"
FILE="@FILE@"
HG="@HG@"
OBJCOPY="@OBJCOPY@"
UNCYGDRIVE="@UNCYGDRIVE@" POST_STRIP_CMD="@POST_STRIP_CMD@"
# Build setup
ENABLE_DOCS="@ENABLE_DOCS@"
GENERATE_DOCS="@ENABLE_DOCS@"
DISABLE_NIMBUS="@DISABLE_NIMBUS@"
USE_EXTERNAL_LIBJPEG="@USE_EXTERNAL_LIBJPEG@"
USE_EXTERNAL_LIBGIF="@USE_EXTERNAL_LIBGIF@"
USE_EXTERNAL_LIBZ="@USE_EXTERNAL_LIBZ@"
LIBZIP_CAN_USE_MMAP="@LIBZIP_CAN_USE_MMAP@"
CHECK_FOR_VCINSTALLDIR="@CHECK_FOR_VCINSTALLDIR@"
MSVCRNN_DLL="@MSVCR100DLL@"
####################################################
#
# Legacy Hotspot support
HOTSPOT_DIST="@HOTSPOT_DIST@"
HOTSPOT_MAKE_ARGS="@HOTSPOT_MAKE_ARGS@"
# This is used from the libjvm build for C/C++ code.
HOTSPOT_BUILD_JOBS="@CONCURRENT_BUILD_JOBS@"
# Control wether Hotspot runs Queens test after building
TEST_IN_BUILD="@TEST_IN_BUILD@"
####################################################
#
# INSTALLATION
#
# Common prefix for all installed files. Defaults to /usr/local,
# but /opt/myjdk is another common version.
INSTALL_PREFIX="@prefix@"
# Directories containing architecture-dependent files should be relative to exec_prefix
INSTALL_EXECPREFIX="@exec_prefix@"
# java,javac,javah,javap etc are installed here.
INSTALL_BINDIR="@bindir@"
# Read only architecture-independent data
INSTALL_DATADIR="@datadir@"
# Root of above.
INSTALL_DATAROOTDIR="@datarootdir@"
# Doc files, other than info and man.
INSTALL_DOCDIR="@docdir@"
# Html documentation
INSTALL_HTMLDIR="@htmldir@"
# Installing C header files, JNI headers for example.
INSTALL_INCLUDEDIR="@includedir@"
# Installing library files....
INSTALL_INCLUDEDIR="@libdir@"
# Executables that other programs run.
INSTALL_LIBEXECDIR="@libexecdir@"
# Locale-dependent but architecture-independent data, such as message catalogs.
INSTALL_LOCALEDIR="@localedir@"
# Modifiable single-machine data
INSTALL_LOCALSTATEDIR="@localstatedir@"
# Man pages
INSTALL_MANDIR="@mandir@"
# Modifiable architecture-independent data.
INSTALL_SHAREDSTATEDIR="@sharedstatedir@"
# Read-only single-machine data
INSTALL_SYSCONFDIR="@sysconfdir@"
####################################################
#
# Misc
#
# Name of Service Agent library
SALIB_NAME="@SALIB_NAME@"
OS_VERSION_MAJOR="@OS_VERSION_MAJOR@"
OS_VERSION_MINOR="@OS_VERSION_MINOR@"
OS_VERSION_MICRO="@OS_VERSION_MICRO@"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,258 @@
#
# Copyright (c) 2011, 2012, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
[
if test "x$VS_ENV_CMD" = x; then
VS100BASE="$1"
METHOD="$2"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS100BASE)
if test -d "$VS100BASE"; then
if test -f "$VS100BASE/$VCVARSFILE"; then
AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
else
AC_MSG_NOTICE([Found Visual Studio installation at $VS100BASE using $METHOD])
AC_MSG_NOTICE([Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring])
fi
fi
fi
])
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
[
if test "x$VS_ENV_CMD" = x; then
WIN_SDK_BASE="$1"
METHOD="$2"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
if test -d "$WIN_SDK_BASE"; then
if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
VS_ENV_ARGS="/x86"
else
VS_ENV_ARGS="/x64"
fi
else
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
fi
fi
fi
])
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
[
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
VCVARSFILE="vc/bin/vcvars32.bat"
else
VCVARSFILE="vc/bin/amd64/vcvars64.bat"
fi
VS_ENV_CMD=""
VS_ENV_ARGS=""
if test "x$with_toolsdir" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir])
fi
if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
# Having specified an argument which is incorrect will produce an instant failure;
# we should not go on looking
AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid Visual Studio installation])
AC_MSG_NOTICE([Please point to the VC/bin directory within the Visual Studio installation])
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
fi
if test "x$ProgramW6432" != x; then
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
fi
if test "x$PROGRAMW6432" != x; then
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
fi
if test "x$PROGRAMFILES" != x; then
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
fi
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin], [well-known name])
if test "x$VS100COMNTOOLS" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable])
fi
if test "x$PROGRAMFILES" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name])
fi
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files/Microsoft Visual Studio 10.0], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name])
])
# Check if the VS env variables were setup prior to running configure.
# If not, then find vcvarsall.bat and run it automatically, and integrate
# the set env variables into the spec file.
AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
[
# Store path to cygwin link.exe to help excluding it when searching for
# VS linker. This must be done before changing the PATH when looking for VS.
AC_PATH_PROG(CYGWIN_LINK, link)
if test "x$CYGWIN_LINK" != x; then
AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
"$CYGWIN_LINK" --version > /dev/null
if test $? -eq 0 ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
# This might be the VS linker. Don't exclude it later on.
CYGWIN_LINK=""
fi
fi
# First-hand choice is to locate and run the vsvars bat file.
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE
if test "x$VS_ENV_CMD" != x; then
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
cd $OUTPUT_ROOT
# FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
# to autoconf standards.
#----
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
# but calculate the difference in Cygwin environment before/after running it and then
# apply the diff.
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
_vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
_dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
_dosbash=`cygpath -a -w -s \`which bash\`.*`
else
_dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
_dosbash=`cmd //c echo \`which bash\``
fi
# generate the set of exported vars before/after the vs10 setup
$ECHO "@echo off" > localdevenvtmp.bat
$ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
$ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat
$ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
# Now execute the newly created bat file.
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys
cmd /c localdevenvtmp.bat | cat
# apply the diff (less some non-vs10 vars named by "!")
$SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
$SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
$COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
# cleanup
$RM localdevenvtmp*
#----
cd $CURDIR
if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
AC_MSG_RESULT([no])
AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
AC_MSG_ERROR([Cannot continue])
fi
# Now set all paths and other env variables. This will allow the rest of
# the configure script to find and run the compiler in the proper way.
AC_MSG_NOTICE([Setting extracted environment variables])
. $OUTPUT_ROOT/localdevenv.sh
else
# We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
fi
# At this point, we should have corrent variables in the environment, or we can't continue.
AC_MSG_CHECKING([for Visual Studio variables])
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
if test "x$INCLUDE" = x || test "x$LIB" = x; then
AC_MSG_RESULT([present but broken])
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
else
AC_MSG_RESULT([ok])
VS_INCLUDE="$INCLUDE"
VS_LIB="$LIB"
VS_PATH="$PATH"
AC_SUBST(VS_INCLUDE)
AC_SUBST(VS_LIB)
AC_SUBST(VS_PATH)
fi
else
AC_MSG_RESULT([not found])
if test "x$VS_ENV_CMD" = x; then
AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk,])
AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
else
AC_MSG_NOTICE([Running the extraction script failed.])
fi
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
AC_MSG_ERROR([Cannot continue])
fi
AC_MSG_CHECKING([for msvcr100.dll])
AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
[copy this msvcr100.dll into the built JDK (Windows only) @<:@probed@:>@])])
if test "x$with_msvcr_dll" != x; then
MSVCR_DLL="$with_msvcr_dll"
else
if test "x$VCINSTALLDIR" != x; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
else
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
if test "x$MSVCR_DLL" = x; then
MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
fi
fi
if test "x$MSVCR_DLL" != x; then
AC_MSG_NOTICE([msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR])
else
AC_MSG_NOTICE([Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR])
fi
fi
if test "x$MSVCR_DLL" = x; then
if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
AC_MSG_NOTICE([msvcr100.dll found in $SYSTEMROOT/system32])
MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
fi
fi
fi
if test "x$MSVCR_DLL" = x; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find msvcr100.dll !])
fi
AC_MSG_RESULT([$MSVCR_DLL])
BASIC_FIXUP_PATH(MSVCR_DLL)
])

View File

@@ -34,3 +34,7 @@ PRODUCT_NAME=OpenJDK
PRODUCT_SUFFIX="Runtime Environment" PRODUCT_SUFFIX="Runtime Environment"
JDK_RC_PLATFORM_NAME=Platform JDK_RC_PLATFORM_NAME=Platform
COMPANY_NAME=N/A COMPANY_NAME=N/A
# Might need better names for these
MACOSX_BUNDLE_NAME_BASE="OpenJDK"
MACOSX_BUNDLE_ID_BASE="net.java.openjdk"

77
common/bin/boot_cycle.sh Normal file
View File

@@ -0,0 +1,77 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# The boot_cycle.sh script performs two complete image builds (no javadoc though....)
# where the second build uses the first build as the boot jdk.
#
# This is useful to verify that the build is self hoisting and assists
# in flushing out bugs. You can follow up with compare_objects.sh to check
# that the two boot_cycle_?/images/j2sdk are identical. They should be.
#
# Usage:
# Specify the configure arguments to boot_cycle.sh, for example:
#
# sh common/bin/boot_cycle.sh --enable-debug --with-jvm-variants=server
#
# The same arguments will be used for both builds, except of course --with-boot-jdk
# that will be adjusted to boot_cycle_1 for the second build.
SCRIPT_DIR=`pwd`/`dirname $0`
ROOT_DIR=`(cd $SCRIPT_DIR/../.. ; pwd)`
BUILD_DIR=$ROOT_DIR/build
mkdir -p $BUILD_DIR
AUTOCONF_DIR=`(cd $SCRIPT_DIR/../autoconf ; pwd)`
BOOT_CYCLE_1_DIR=$BUILD_DIR/boot_cycle_1
BOOT_CYCLE_2_DIR=$BUILD_DIR/boot_cycle_2
# Create the boot cycle dirs in the build directory.
mkdir -p $BOOT_CYCLE_1_DIR
mkdir -p $BOOT_CYCLE_2_DIR
cd $BOOT_CYCLE_1_DIR
# Configure!
sh $AUTOCONF_DIR/configure "$@"
# Now build!
make images
if ! test -x $BOOT_CYCLE_1_DIR/images/j2sdk-image/bin/java ; then
echo Failed to build the executable $BOOT_CYCLE_1_DIR/images/j2sdk-image/bin/java
exit 1
fi
cd $BOOT_CYCLE_2_DIR
# Pickup the configure arguments, but drop any --with-boot-jdk=....
# and add the correct --with-boot-jdk=...boot_cycle_1... at the end.
ARGUMENTS="`cat $BOOT_CYCLE_1_DIR/configure-arguments|sed 's/--with-boot-jdk=[^ ]*//'` --with-boot-jdk=$BOOT_CYCLE_1_DIR/images/j2sdk-image"
# Configure using these adjusted arguments.
sh $AUTOCONF_DIR/configure $ARGUMENTS
# Now build!
make images
if ! test -x $BOOT_CYCLE_2_DIR/images/j2sdk-image/bin/java ; then
echo Failed to build the final executable $BOOT_CYCLE_2_DIR/images/j2sdk-image/bin/java
exit 1
fi

View File

@@ -30,7 +30,7 @@
# #
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
echo "bash ./common/bin/compare-build.sh old_jdk_build_dir new_jdk_build_dir" echo "bash ./common/bin/compare-objects.sh old_jdk_build_dir new_jdk_build_dir <pattern>"
echo "" echo ""
echo "Compare object files" echo "Compare object files"
echo "" echo ""

1220
common/bin/compare.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,935 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# This script is not to be run as stand-alone, it should be included from
# compare.sh.
##########################################################################################
# Check that we are run via inclusion from compare.sh and not as stand-alone.
if [ -z "$COMPARE_EXCEPTIONS_INCLUDE" ]; then
echo "Error: This script should not be run as stand-alone. It is included by compare.sh"
exit 1
fi
##########################################################################################
# Diff exceptions
if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then
STRIP_BEFORE_COMPARE="
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/libgctest.so
./demo/jvmti/heapTracker/lib/libheapTracker.so
./demo/jvmti/heapViewer/lib/libheapViewer.so
./demo/jvmti/hprof/lib/libhprof.so
./demo/jvmti/minst/lib/libminst.so
./demo/jvmti/mtrace/lib/libmtrace.so
./demo/jvmti/versionCheck/lib/libversionCheck.so
./demo/jvmti/waiters/lib/libwaiters.so
"
ACCEPTED_BIN_DIFF="
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/libgctest.so
./demo/jvmti/heapTracker/lib/libheapTracker.so
./demo/jvmti/heapViewer/lib/libheapViewer.so
./demo/jvmti/hprof/lib/libhprof.so
./demo/jvmti/minst/lib/libminst.so
./demo/jvmti/mtrace/lib/libmtrace.so
./demo/jvmti/versionCheck/lib/libversionCheck.so
./demo/jvmti/waiters/lib/libwaiters.so
./jre/lib/i386/client/libjvm.so
./jre/lib/i386/libattach.so
./jre/lib/i386/libdt_socket.so
./jre/lib/i386/libhprof.so
./jre/lib/i386/libinstrument.so
./jre/lib/i386/libjava_crw_demo.so
./jre/lib/i386/libjsdt.so
./jre/lib/i386/libmanagement.so
./jre/lib/i386/libnpt.so
./jre/lib/i386/libverify.so
./jre/lib/i386/server/libjvm.so
./bin/appletviewer
./bin/extcheck
./bin/idlj
./bin/jar
./bin/jarsigner
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/jcmd
./bin/jconsole
./bin/jdb
./bin/jhat
./bin/jinfo
./bin/jmap
./bin/jps
./bin/jrunscript
./bin/jsadebugd
./bin/jstack
./bin/jstat
./bin/jstatd
./bin/keytool
./bin/native2ascii
./bin/orbd
./bin/pack200
./bin/policytool
./bin/rmic
./bin/rmid
./bin/rmiregistry
./bin/schemagen
./bin/serialver
./bin/servertool
./bin/tnameserv
./bin/wsgen
./bin/wsimport
./bin/xjc
./jre/bin/java
./jre/bin/keytool
./jre/bin/orbd
./jre/bin/pack200
./jre/bin/policytool
./jre/bin/rmid
./jre/bin/rmiregistry
./jre/bin/servertool
./jre/bin/tnameserv
"
fi
if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
STRIP_BEFORE_COMPARE="
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/libgctest.so
./demo/jvmti/heapTracker/lib/libheapTracker.so
./demo/jvmti/heapViewer/lib/libheapViewer.so
./demo/jvmti/hprof/lib/libhprof.so
./demo/jvmti/minst/lib/libminst.so
./demo/jvmti/mtrace/lib/libmtrace.so
./demo/jvmti/versionCheck/lib/libversionCheck.so
./demo/jvmti/waiters/lib/libwaiters.so
"
ACCEPTED_BIN_DIFF="
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/libgctest.so
./demo/jvmti/heapTracker/lib/libheapTracker.so
./demo/jvmti/heapViewer/lib/libheapViewer.so
./demo/jvmti/hprof/lib/libhprof.so
./demo/jvmti/minst/lib/libminst.so
./demo/jvmti/mtrace/lib/libmtrace.so
./demo/jvmti/versionCheck/lib/libversionCheck.so
./demo/jvmti/waiters/lib/libwaiters.so
./jre/lib/amd64/libattach.so
./jre/lib/amd64/libdt_socket.so
./jre/lib/amd64/libhprof.so
./jre/lib/amd64/libinstrument.so
./jre/lib/amd64/libjava_crw_demo.so
./jre/lib/amd64/libjsdt.so
./jre/lib/amd64/libjsig.so
./jre/lib/amd64/libmanagement.so
./jre/lib/amd64/libnpt.so
./jre/lib/amd64/libsaproc.so
./jre/lib/amd64/libverify.so
./jre/lib/amd64/server/libjsig.so
./jre/lib/amd64/server/libjvm.so
./bin/appletviewer
./bin/extcheck
./bin/idlj
./bin/jar
./bin/jarsigner
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/jcmd
./bin/jconsole
./bin/jdb
./bin/jhat
./bin/jinfo
./bin/jmap
./bin/jps
./bin/jrunscript
./bin/jsadebugd
./bin/jstack
./bin/jstat
./bin/jstatd
./bin/keytool
./bin/native2ascii
./bin/orbd
./bin/pack200
./bin/policytool
./bin/rmic
./bin/rmid
./bin/rmiregistry
./bin/schemagen
./bin/serialver
./bin/servertool
./bin/tnameserv
./bin/wsgen
./bin/wsimport
./bin/xjc
./jre/bin/java
./jre/bin/keytool
./jre/bin/orbd
./jre/bin/pack200
./jre/bin/policytool
./jre/bin/rmid
./jre/bin/rmiregistry
./jre/bin/servertool
./jre/bin/tnameserv
"
fi
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then
STRIP_BEFORE_COMPARE="
./demo/jni/Poller/lib/libPoller.so
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/libgctest.so
./demo/jvmti/heapTracker/lib/libheapTracker.so
./demo/jvmti/heapViewer/lib/libheapViewer.so
./demo/jvmti/hprof/lib/libhprof.so
./demo/jvmti/minst/lib/libminst.so
./demo/jvmti/mtrace/lib/libmtrace.so
./demo/jvmti/versionCheck/lib/libversionCheck.so
./demo/jvmti/waiters/lib/libwaiters.so
./jre/lib/i386/jexec
"
SORT_SYMBOLS="
./jre/lib/i386/client/libjvm.so
./jre/lib/i386/libsaproc.so
./jre/lib/i386/server/libjvm.so
"
SKIP_BIN_DIFF="true"
ACCEPTED_SMALL_SIZE_DIFF="
./demo/jni/Poller/lib/libPoller.so
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/libgctest.so
./demo/jvmti/heapTracker/lib/libheapTracker.so
./demo/jvmti/heapViewer/lib/libheapViewer.so
./demo/jvmti/hprof/lib/libhprof.so
./demo/jvmti/minst/lib/libminst.so
./demo/jvmti/mtrace/lib/libmtrace.so
./demo/jvmti/versionCheck/lib/libversionCheck.so
./demo/jvmti/waiters/lib/libwaiters.so
./jre/lib/i386/client/libjvm.so
./jre/lib/i386/jli/libjli.so
./jre/lib/i386/libJdbcOdbc.so
./jre/lib/i386/libattach.so
./jre/lib/i386/libawt.so
./jre/lib/i386/libawt_headless.so
./jre/lib/i386/libawt_xawt.so
./jre/lib/i386/libdcpr.so
./jre/lib/i386/libdt_socket.so
./jre/lib/i386/libfontmanager.so
./jre/lib/i386/libhprof.so
./jre/lib/i386/libinstrument.so
./jre/lib/i386/libj2gss.so
./jre/lib/i386/libj2pcsc.so
./jre/lib/i386/libj2pkcs11.so
./jre/lib/i386/libj2ucrypto.so
./jre/lib/i386/libjaas_unix.so
./jre/lib/i386/libjava.so
./jre/lib/i386/libjava_crw_demo.so
./jre/lib/i386/libjawt.so
./jre/lib/i386/libjdwp.so
./jre/lib/i386/libjfr.so
./jre/lib/i386/libjpeg.so
./jre/lib/i386/libjsdt.so
./jre/lib/i386/libjsound.so
./jre/lib/i386/libkcms.so
./jre/lib/i386/liblcms.so
./jre/lib/i386/libmanagement.so
./jre/lib/i386/libmlib_image.so
./jre/lib/i386/libnet.so
./jre/lib/i386/libnio.so
./jre/lib/i386/libnpt.so
./jre/lib/i386/libsctp.so
./jre/lib/i386/libsplashscreen.so
./jre/lib/i386/libsunec.so
./jre/lib/i386/libsunwjdga.so
./jre/lib/i386/libt2k.so
./jre/lib/i386/libunpack.so
./jre/lib/i386/libverify.so
./jre/lib/i386/libzip.so
./jre/lib/i386/server/libjvm.so
./bin/appletviewer
./bin/extcheck
./bin/idlj
./bin/jar
./bin/jarsigner
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/jcmd
./bin/jconsole
./bin/jdb
./bin/jhat
./bin/jinfo
./bin/jmap
./bin/jps
./bin/jrunscript
./bin/jsadebugd
./bin/jstack
./bin/jstat
./bin/jstatd
./bin/keytool
./bin/native2ascii
./bin/orbd
./bin/pack200
./bin/policytool
./bin/rmic
./bin/rmid
./bin/rmiregistry
./bin/schemagen
./bin/serialver
./bin/servertool
./bin/tnameserv
./bin/unpack200
./bin/wsgen
./bin/wsimport
./bin/xjc
./jre/bin/java
./jre/bin/keytool
./jre/bin/orbd
./jre/bin/pack200
./jre/bin/policytool
./jre/bin/rmid
./jre/bin/rmiregistry
./jre/bin/servertool
./jre/bin/tnameserv
./jre/bin/unpack200
./jre/lib/i386/jexec
"
SKIP_FULLDUMP_DIFF="true"
# Filter random C++ symbol strings.
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
fi
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
STRIP_BEFORE_COMPARE="
./demo/jni/Poller/lib/amd64/libPoller.so
./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/amd64/libgctest.so
./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
./demo/jvmti/hprof/lib/amd64/libhprof.so
./demo/jvmti/minst/lib/amd64/libminst.so
./demo/jvmti/mtrace/lib/amd64/libmtrace.so
./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
./demo/jvmti/waiters/lib/amd64/libwaiters.so
"
SORT_SYMBOLS="
./jre/lib/amd64/server/libjvm.so
./jre/lib/amd64/libsaproc.so
"
SKIP_BIN_DIFF="true"
ACCEPTED_SMALL_SIZE_DIFF="
./demo/jni/Poller/lib/amd64/libPoller.so
./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/amd64/libgctest.so
./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
./demo/jvmti/hprof/lib/amd64/libhprof.so
./demo/jvmti/minst/lib/amd64/libminst.so
./demo/jvmti/mtrace/lib/amd64/libmtrace.so
./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
./demo/jvmti/waiters/lib/amd64/libwaiters.so
./jre/lib/amd64/jli/libjli.so
./jre/lib/amd64/libJdbcOdbc.so
./jre/lib/amd64/libattach.so
./jre/lib/amd64/libawt.so
./jre/lib/amd64/libawt_headless.so
./jre/lib/amd64/libawt_xawt.so
./jre/lib/amd64/libdcpr.so
./jre/lib/amd64/libdt_socket.so
./jre/lib/amd64/libfontmanager.so
./jre/lib/amd64/libhprof.so
./jre/lib/amd64/libinstrument.so
./jre/lib/amd64/libj2gss.so
./jre/lib/amd64/libj2pcsc.so
./jre/lib/amd64/libj2pkcs11.so
./jre/lib/amd64/libj2ucrypto.so
./jre/lib/amd64/libjaas_unix.so
./jre/lib/amd64/libjava.so
./jre/lib/amd64/libjava_crw_demo.so
./jre/lib/amd64/libjawt.so
./jre/lib/amd64/libjdwp.so
./jre/lib/amd64/libjfr.so
./jre/lib/amd64/libjpeg.so
./jre/lib/amd64/libjsdt.so
./jre/lib/amd64/libjsound.so
./jre/lib/amd64/libkcms.so
./jre/lib/amd64/liblcms.so
./jre/lib/amd64/libmanagement.so
./jre/lib/amd64/libmlib_image.so
./jre/lib/amd64/libnet.so
./jre/lib/amd64/libnio.so
./jre/lib/amd64/libnpt.so
./jre/lib/amd64/libsctp.so
./jre/lib/amd64/libsplashscreen.so
./jre/lib/amd64/libsunec.so
./jre/lib/amd64/libsunwjdga.so
./jre/lib/amd64/libt2k.so
./jre/lib/amd64/libunpack.so
./jre/lib/amd64/libverify.so
./jre/lib/amd64/libzip.so
./jre/lib/amd64/server/64/libjvm_db.so
./jre/lib/amd64/server/64/libjvm_dtrace.so
./bin/amd64/appletviewer
./bin/amd64/extcheck
./bin/amd64/idlj
./bin/amd64/jar
./bin/amd64/jarsigner
./bin/amd64/java
./bin/amd64/javac
./bin/amd64/javadoc
./bin/amd64/javah
./bin/amd64/javap
./bin/amd64/jcmd
./bin/amd64/jconsole
./bin/amd64/jdb
./bin/amd64/jhat
./bin/amd64/jinfo
./bin/amd64/jmap
./bin/amd64/jps
./bin/amd64/jrunscript
./bin/amd64/jsadebugd
./bin/amd64/jstack
./bin/amd64/jstat
./bin/amd64/jstatd
./bin/amd64/keytool
./bin/amd64/native2ascii
./bin/amd64/orbd
./bin/amd64/pack200
./bin/amd64/policytool
./bin/amd64/rmic
./bin/amd64/rmid
./bin/amd64/rmiregistry
./bin/amd64/schemagen
./bin/amd64/serialver
./bin/amd64/servertool
./bin/amd64/tnameserv
./bin/amd64/unpack200
./bin/amd64/wsgen
./bin/amd64/wsimport
./bin/amd64/xjc
./jre/bin/amd64/java
./jre/bin/amd64/keytool
./jre/bin/amd64/orbd
./jre/bin/amd64/pack200
./jre/bin/amd64/policytool
./jre/bin/amd64/rmid
./jre/bin/amd64/rmiregistry
./jre/bin/amd64/servertool
./jre/bin/amd64/tnameserv
./jre/bin/amd64/unpack200
./jre/lib/amd64/jexec
"
SKIP_FULLDUMP_DIFF="true"
# Filter random C++ symbol strings.
DIS_DIFF_FILTER="$SED -e s/\.[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g"
fi
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparc" ]; then
STRIP_BEFORE_COMPARE="
./demo/jni/Poller/lib/libPoller.so
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/libgctest.so
./demo/jvmti/heapTracker/lib/libheapTracker.so
./demo/jvmti/heapViewer/lib/libheapViewer.so
./demo/jvmti/hprof/lib/libhprof.so
./demo/jvmti/minst/lib/libminst.so
./demo/jvmti/mtrace/lib/libmtrace.so
./demo/jvmti/versionCheck/lib/libversionCheck.so
./demo/jvmti/waiters/lib/libwaiters.so
./jre/lib/sparc/jexec
"
SORT_SYMBOLS="
./demo/jvmti/waiters/lib/libwaiters.so
./jre/lib/sparc/client/64/libjvm_db.so
./jre/lib/sparc/client/64/libjvm_dtrace.so
./jre/lib/sparc/client/libjsig.so
./jre/lib/sparc/client/libjvm.so
./jre/lib/sparc/client/libjvm_db.so
./jre/lib/sparc/client/libjvm_dtrace.so
./jre/lib/sparc/libjsig.so
./jre/lib/sparc/libsaproc.so
./jre/lib/sparc/server/64/libjvm_db.so
./jre/lib/sparc/server/64/libjvm_dtrace.so
./jre/lib/sparc/server/libjsig.so
./jre/lib/sparc/server/libjvm.so
./jre/lib/sparc/server/libjvm_db.so
./jre/lib/sparc/server/libjvm_dtrace.so
"
SKIP_BIN_DIFF="true"
ACCEPTED_SMALL_SIZE_DIFF="
./demo/jni/Poller/lib/libPoller.so
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/libgctest.so
./demo/jvmti/heapTracker/lib/libheapTracker.so
./demo/jvmti/heapViewer/lib/libheapViewer.so
./demo/jvmti/hprof/lib/libhprof.so
./demo/jvmti/minst/lib/libminst.so
./demo/jvmti/mtrace/lib/libmtrace.so
./demo/jvmti/versionCheck/lib/libversionCheck.so
./demo/jvmti/waiters/lib/libwaiters.so
./jre/lib/sparc/client/libjvm.so
./jre/lib/sparc/jli/libjli.so
./jre/lib/sparc/libJdbcOdbc.so
./jre/lib/sparc/libattach.so
./jre/lib/sparc/libawt.so
./jre/lib/sparc/libawt_headless.so
./jre/lib/sparc/libawt_xawt.so
./jre/lib/sparc/libdcpr.so
./jre/lib/sparc/libdt_socket.so
./jre/lib/sparc/libfontmanager.so
./jre/lib/sparc/libhprof.so
./jre/lib/sparc/libinstrument.so
./jre/lib/sparc/libj2gss.so
./jre/lib/sparc/libj2pcsc.so
./jre/lib/sparc/libj2pkcs11.so
./jre/lib/sparc/libj2ucrypto.so
./jre/lib/sparc/libjaas_unix.so
./jre/lib/sparc/libjava.so
./jre/lib/sparc/libjava_crw_demo.so
./jre/lib/sparc/libjawt.so
./jre/lib/sparc/libjdwp.so
./jre/lib/sparc/libjfr.so
./jre/lib/sparc/libjpeg.so
./jre/lib/sparc/libjsdt.so
./jre/lib/sparc/libjsound.so
./jre/lib/sparc/libkcms.so
./jre/lib/sparc/liblcms.so
./jre/lib/sparc/libmanagement.so
./jre/lib/sparc/libmlib_image.so
./jre/lib/sparc/libmlib_image_v.so
./jre/lib/sparc/libnet.so
./jre/lib/sparc/libnio.so
./jre/lib/sparc/libnpt.so
./jre/lib/sparc/libsctp.so
./jre/lib/sparc/libsplashscreen.so
./jre/lib/sparc/libsunec.so
./jre/lib/sparc/libsunwjdga.so
./jre/lib/sparc/libt2k.so
./jre/lib/sparc/libunpack.so
./jre/lib/sparc/libverify.so
./jre/lib/sparc/libzip.so
./jre/lib/sparc/server/libjvm.so
./bin/appletviewer
./bin/extcheck
./bin/idlj
./bin/jar
./bin/jarsigner
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/jcmd
./bin/jconsole
./bin/jdb
./bin/jhat
./bin/jinfo
./bin/jmap
./bin/jps
./bin/jrunscript
./bin/jsadebugd
./bin/jstack
./bin/jstat
./bin/jstatd
./bin/keytool
./bin/native2ascii
./bin/orbd
./bin/pack200
./bin/policytool
./bin/rmic
./bin/rmid
./bin/rmiregistry
./bin/schemagen
./bin/serialver
./bin/servertool
./bin/tnameserv
./bin/unpack200
./bin/wsgen
./bin/wsimport
./bin/xjc
./jre/bin/java
./jre/bin/keytool
./jre/bin/orbd
./jre/bin/pack200
./jre/bin/policytool
./jre/bin/rmid
./jre/bin/rmiregistry
./jre/bin/servertool
./jre/bin/tnameserv
./jre/bin/unpack200
./jre/lib/sparc/jexec
"
# Filter random C++ symbol strings.
# Some numbers differ randomly.
DIS_DIFF_FILTER="$SED -e s/\$[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/\([0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].\)[0-9a-f][0-9a-f]/\1<NUM>/g -e s/\(%g1,.0x\)[0-9a-f]*\(,.%g1\)/\1<HEX>\2/g -e s/\(!.\)[0-9a-f]*\(.<SUNWprivate_1.1+0x\)[0-9a-f]*/\1<NUM>\2<HEX>/g"
# Some xor instructions end up with different args in the lib but not in the object files.
ACCEPTED_DIS_DIFF="
./demo/jvmti/waiters/lib/libwaiters.so
"
SKIP_FULLDUMP_DIFF="true"
fi
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "sparcv9" ]; then
STRIP_BEFORE_COMPARE="
./demo/jni/Poller/lib/sparcv9/libPoller.so
./demo/jvmti/compiledMethodLoad/lib/sparcv9/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/sparcv9/libgctest.so
./demo/jvmti/heapTracker/lib/sparcv9/libheapTracker.so
./demo/jvmti/heapViewer/lib/sparcv9/libheapViewer.so
./demo/jvmti/hprof/lib/sparcv9/libhprof.so
./demo/jvmti/minst/lib/sparcv9/libminst.so
./demo/jvmti/mtrace/lib/sparcv9/libmtrace.so
./demo/jvmti/versionCheck/lib/sparcv9/libversionCheck.so
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
"
SORT_SYMBOLS="
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
./jre/lib/sparcv9/libjsig.so
./jre/lib/sparcv9/libsaproc.so
./jre/lib/sparcv9/server/libjvm.so
./jre/lib/sparcv9/server/libjvm_dtrace.so
"
SKIP_BIN_DIFF="true"
ACCEPTED_SMALL_SIZE_DIFF="
./demo/jni/Poller/lib/sparcv9/libPoller.so
./demo/jvmti/compiledMethodLoad/lib/sparcv9/libcompiledMethodLoad.so
./demo/jvmti/gctest/lib/sparcv9/libgctest.so
./demo/jvmti/heapTracker/lib/sparcv9/libheapTracker.so
./demo/jvmti/heapViewer/lib/sparcv9/libheapViewer.so
./demo/jvmti/hprof/lib/sparcv9/libhprof.so
./demo/jvmti/minst/lib/sparcv9/libminst.so
./demo/jvmti/mtrace/lib/sparcv9/libmtrace.so
./demo/jvmti/versionCheck/lib/sparcv9/libversionCheck.so
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
./jre/lib/sparcv9/client/libjvm.so
./jre/lib/sparcv9/jli/libjli.so
./jre/lib/sparcv9/libJdbcOdbc.so
./jre/lib/sparcv9/libattach.so
./jre/lib/sparcv9/libawt.so
./jre/lib/sparcv9/libawt_headless.so
./jre/lib/sparcv9/libawt_xawt.so
./jre/lib/sparcv9/libdcpr.so
./jre/lib/sparcv9/libdt_socket.so
./jre/lib/sparcv9/libfontmanager.so
./jre/lib/sparcv9/libhprof.so
./jre/lib/sparcv9/libinstrument.so
./jre/lib/sparcv9/libj2gss.so
./jre/lib/sparcv9/libj2pcsc.so
./jre/lib/sparcv9/libj2pkcs11.so
./jre/lib/sparcv9/libj2ucrypto.so
./jre/lib/sparcv9/libjaas_unix.so
./jre/lib/sparcv9/libjava.so
./jre/lib/sparcv9/libjava_crw_demo.so
./jre/lib/sparcv9/libjawt.so
./jre/lib/sparcv9/libjdwp.so
./jre/lib/sparcv9/libjfr.so
./jre/lib/sparcv9/libjpeg.so
./jre/lib/sparcv9/libjsdt.so
./jre/lib/sparcv9/libjsound.so
./jre/lib/sparcv9/libkcms.so
./jre/lib/sparcv9/liblcms.so
./jre/lib/sparcv9/libmanagement.so
./jre/lib/sparcv9/libmlib_image.so
./jre/lib/sparcv9/libmlib_image_v.so
./jre/lib/sparcv9/libnet.so
./jre/lib/sparcv9/libnio.so
./jre/lib/sparcv9/libnpt.so
./jre/lib/sparcv9/libsctp.so
./jre/lib/sparcv9/libsplashscreen.so
./jre/lib/sparcv9/libsunec.so
./jre/lib/sparcv9/libsunwjdga.so
./jre/lib/sparcv9/libt2k.so
./jre/lib/sparcv9/libunpack.so
./jre/lib/sparcv9/libverify.so
./jre/lib/sparcv9/libzip.so
./jre/lib/sparcv9/server/libjvm.so
./bin/sparcv9/appletviewer
./bin/sparcv9/extcheck
./bin/sparcv9/idlj
./bin/sparcv9/jar
./bin/sparcv9/jarsigner
./bin/sparcv9/java
./bin/sparcv9/javac
./bin/sparcv9/javadoc
./bin/sparcv9/javah
./bin/sparcv9/javap
./bin/sparcv9/jcmd
./bin/sparcv9/jconsole
./bin/sparcv9/jdb
./bin/sparcv9/jhat
./bin/sparcv9/jinfo
./bin/sparcv9/jmap
./bin/sparcv9/jps
./bin/sparcv9/jrunscript
./bin/sparcv9/jsadebugd
./bin/sparcv9/jstack
./bin/sparcv9/jstat
./bin/sparcv9/jstatd
./bin/sparcv9/keytool
./bin/sparcv9/native2ascii
./bin/sparcv9/orbd
./bin/sparcv9/pack200
./bin/sparcv9/policytool
./bin/sparcv9/rmic
./bin/sparcv9/rmid
./bin/sparcv9/rmiregistry
./bin/sparcv9/schemagen
./bin/sparcv9/serialver
./bin/sparcv9/servertool
./bin/sparcv9/tnameserv
./bin/sparcv9/unpack200
./bin/sparcv9/wsgen
./bin/sparcv9/wsimport
./bin/sparcv9/xjc
./jre/bin/sparcv9/java
./jre/bin/sparcv9/keytool
./jre/bin/sparcv9/orbd
./jre/bin/sparcv9/pack200
./jre/bin/sparcv9/policytool
./jre/bin/sparcv9/rmid
./jre/bin/sparcv9/rmiregistry
./jre/bin/sparcv9/servertool
./jre/bin/sparcv9/tnameserv
./jre/bin/sparcv9/unpack200
"
# Filter random C++ symbol strings.
# Some numbers differ randomly.
DIS_DIFF_FILTER="$SED -e s/\$[a-zA-Z0-9_\$]\{15,15\}/<SYM>/g -e s/[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f].[0-9a-f][0-9a-f]/<NUMS>/g -e s/\(%g1,.0x\)[0-9a-f]*\(,.%g1\)/\1<HEX>\2/g -e s/\(!.\)[0-9a-f]*\(.<SUNWprivate_1.1+0x\)[0-9a-f]*/\1<NUM>\2<HEX>/g"
# Some xor instructions end up with different args in the lib but not in the object files.
ACCEPTED_DIS_DIFF="
./demo/jvmti/waiters/lib/sparcv9/libwaiters.so
"
SKIP_FULLDUMP_DIFF="true"
fi
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
# Probably should add all libs here
ACCEPTED_SMALL_SIZE_DIFF="
./demo/jvmti/gctest/lib/gctest.dll
./demo/jvmti/heapTracker/lib/heapTracker.dll
./demo/jvmti/minst/lib/minst.dll
./jre/bin/attach.dll
./jre/bin/java_crw_demo.dll
./jre/bin/jsoundds.dll
./bin/appletviewer.exe
./bin/extcheck.exe
./bin/idlj.exe
./bin/jar.exe
./bin/jarsigner.exe
./bin/java-rmi.exe
./bin/java.exe
./bin/javac.exe
./bin/javadoc.exe
./bin/javah.exe
./bin/javap.exe
./bin/javaw.exe
./bin/jcmd.exe
./bin/jconsole.exe
./bin/jdb.exe
./bin/jhat.exe
./bin/jinfo.exe
./bin/jmap.exe
./bin/jps.exe
./bin/jrunscript.exe
./bin/jsadebugd.exe
./bin/jstack.exe
./bin/jstat.exe
./bin/jstatd.exe
./bin/keytool.exe
./bin/kinit.exe
./bin/klist.exe
./bin/ktab.exe
./bin/native2ascii.exe
./bin/orbd.exe
./bin/pack200.exe
./bin/policytool.exe
./bin/rmic.exe
./bin/rmid.exe
./bin/rmiregistry.exe
./bin/schemagen.exe
./bin/serialver.exe
./bin/servertool.exe
./bin/tnameserv.exe
./bin/unpack200.exe
./bin/wsgen.exe
./bin/wsimport.exe
./bin/xjc.exe
./jre/bin/java-rmi.exe
./jre/bin/java.exe
./jre/bin/javaw.exe
./jre/bin/keytool.exe
./jre/bin/kinit.exe
./jre/bin/klist.exe
./jre/bin/ktab.exe
./jre/bin/orbd.exe
./jre/bin/pack200.exe
./jre/bin/policytool.exe
./jre/bin/rmid.exe
./jre/bin/rmiregistry.exe
./jre/bin/servertool.exe
./jre/bin/tnameserv.exe
./jre/bin/unpack200.exe
"
# On windows, there are unavoidable allignment issues making
# a perfect disasm diff impossible. Filter out the following:
# * Random parts of C++ symbols (this is a bit greedy, but does the trick)
# @XXXXX
# * Hexadecimal addresses that are sometimes alligned differently.
# * Dates in version strings XXXX_XX_XX.
DIS_DIFF_FILTER="$SED -e s/[@?][A-Z0-9_]\{1,25\}/<SYM>/g -e s/^.\{2,2\}[0-9A-F]\{16,16\}.\{2,2\}//g -e s/[0-9A-F]\{4,16\}h/<HEXSTR>/g -e s/_[0-9]\{4,4\}_[0-9][0-9]_[0-9][0-9]/<DATE>/g"
SKIP_BIN_DIFF="true"
SKIP_FULLDUMP_DIFF="true"
fi
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
ACCEPTED_JARZIP_CONTENTS="
/META-INF/INDEX.LIST
"
KNOWN_BIN_DIFF="
./jre/lib/libJObjC.dylib
"
ACCEPTED_BIN_DIFF="
./bin/appletviewer
./bin/extcheck
./bin/idlj
./bin/jar
./bin/jarsigner
./bin/java
./bin/javac
./bin/javadoc
./bin/javah
./bin/javap
./bin/jcmd
./bin/jconsole
./bin/jdb
./bin/jhat
./bin/jinfo
./bin/jmap
./bin/jps
./bin/jrunscript
./bin/jsadebugd
./bin/jstack
./bin/jstat
./bin/jstatd
./bin/keytool
./bin/native2ascii
./bin/orbd
./bin/pack200
./bin/policytool
./bin/rmic
./bin/rmid
./bin/rmiregistry
./bin/schemagen
./bin/serialver
./bin/servertool
./bin/tnameserv
./bin/wsgen
./bin/wsimport
./bin/xjc
./jre/bin/java
./jre/bin/keytool
./jre/bin/orbd
./jre/bin/pack200
./jre/bin/policytool
./jre/bin/rmid
./jre/bin/rmiregistry
./jre/bin/servertool
./jre/bin/tnameserv
./jre/lib/libsaproc.dylib
./jre/lib/server/libjvm.dylib
"
KNOWN_SIZE_DIFF="
./jre/lib/libJObjC.dylib
"
SORT_SYMBOLS="
./jre/lib/libJObjC.dylib
"
KNOWN_SYM_DIFF="
./jre/lib/libJObjC.dylib
"
KNOWN_ELF_DIFF="
./jre/lib/libJObjC.dylib
"
KNOWN_DIS_DIFF="
./jre/lib/libJObjC.dylib
"
fi

View File

@@ -1,335 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# MANUAL
#
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image
#
# Compare the directory structure.
# Compare the filenames in the directories.
# Compare the contents of the zip archives
# Compare the contents of the jar archives
# Compare the native libraries
# Compare the native executables
# Compare the remaining files
#
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]
#
# Compare only the selected subset of the images.
#
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar
#
# Compare only the CodePointIM.jar file
# Can be used to compare zips, libraries and executables.
#
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image"
echo ""
echo "Compare the directory structure."
echo "Compare the filenames in the directories."
echo "Compare the contents of the zip archives"
echo "Compare the contents of the jar archives"
echo "Compare the native libraries"
echo "Compare the native executables"
echo "Compare the remaining files"
echo ""
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]"
echo ""
echo "Compare only the selected subset of the images."
echo ""
echo "bash ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar"
echo ""
echo "Compare only the CodePointIM.jar file"
echo "Can be used to compare zips, libraries and executables."
exit 10
fi
OLD="$1"
NEW="$2"
CMD="$3"
DIFF_RESULT=0
CMP_ZIPS=false
CMP_JARS=false
CMP_LIBS=false
CMP_EXECS=false
CMP_OTHER=false
FILTER="cat"
if [ -n "$CMD" ]; then
case "$CMD" in
zips)
CMP_ZIPS=true
;;
jars)
CMP_JARS=true
;;
libs)
CMP_LIBS=true
;;
execs)
CMP_EXECS=true
;;
other)
CMP_OTHER=true
;;
*)
CMP_ZIPS=true
CMP_JARS=true
CMP_LIBS=true
CMP_EXECS=true
CMP_OTHER=true
FILTER="grep $3"
;;
esac
else
CMP_ZIPS=true
CMP_JARS=true
CMP_LIBS=true
CMP_EXECS=true
CMP_OTHER=true
fi
DIFFJARZIP="/bin/bash `dirname $0`/diffjarzip.sh"
DIFFLIB="/bin/bash `dirname $0`/difflib.sh"
DIFFEXEC="/bin/bash `dirname $0`/diffexec.sh"
export COMPARE_ROOT=/tmp/cimages.$USER
mkdir -p $COMPARE_ROOT
# Load the correct exception list.
case "`uname -s`" in
Linux)
. `dirname $0`/exception_list_linux
;;
esac
echo
echo Comparing $OLD to $NEW
echo
(cd $OLD && find . -type d | sort > $COMPARE_ROOT/from_dirs)
(cd $NEW && find . -type d | sort > $COMPARE_ROOT/to_dirs)
echo -n Directory structure...
if diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs > /dev/null; then
echo Identical!
else
echo Differences found.
DIFF_RESULT=1
# Differences in directories found.
ONLY_OLD=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '<')
if [ "$ONLY_OLD" ]; then
echo Only in $OLD
echo $ONLY_OLD | sed 's|< ./|\t|g' | sed 's/ /\n/g'
fi
# Differences in directories found.
ONLY_NEW=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '>')
if [ "$ONLY_NEW" ]; then
echo Only in $NEW
echo $ONLY_NEW | sed 's|> ./|\t|g' | sed 's/ /\n/g'
fi
fi
(cd $OLD && find . -type f | sort > $COMPARE_ROOT/from_files)
(cd $NEW && find . -type f | sort > $COMPARE_ROOT/to_files)
echo -n File names...
if diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files > /dev/null; then
echo Identical!
else
echo Differences found.
DIFF_RESULT=1
# Differences in directories found.
ONLY_OLD=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '<')
if [ "$ONLY_OLD" ]; then
echo Only in $OLD
echo "$ONLY_OLD" | sed 's|< ./| |g'
fi
# Differences in directories found.
ONLY_NEW=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '>')
if [ "$ONLY_NEW" ]; then
echo Only in $NEW
echo "$ONLY_NEW" | sed 's|> ./| |g'
fi
fi
echo -n Permissions...
found=""
for f in `cd $OLD && find . -type f`
do
if [ ! -f ${OLD}/$f ]; then continue; fi
if [ ! -f ${NEW}/$f ]; then continue; fi
OP=`ls -l ${OLD}/$f | awk '{printf("%.10s\n", $1);}'`
NP=`ls -l ${NEW}/$f | awk '{printf("%.10s\n", $1);}'`
if [ "$OP" != "$NP" ]
then
if [ -z "$found" ]; then echo ; found="yes"; fi
printf "\told: ${OP} new: ${NP}\t$f\n"
fi
OF=`cd ${OLD} && file $f`
NF=`cd ${NEW} && file $f`
if [ "$f" = "./src.zip" ]
then
if [ "`echo $OF | grep -ic zip`" -gt 0 -a "`echo $NF | grep -ic zip`" -gt 0 ]
then
# the way we produces zip-files make it so that directories are stored in old file
# but not in new (only files with full-path)
# this makes file-5.09 report them as different
continue;
fi
fi
if [ "$OF" != "$NF" ]
then
if [ -z "$found" ]; then echo ; found="yes"; fi
printf "\tFILE: old: ${OF} new: ${NF}\t$f\n"
fi
done
if [ -z "$found" ]; then echo ; found="yes"; fi
GENERAL_FILES=$(cd $OLD && find . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
! -name "ct.sym" ! -name "*.diz" \
| grep -v "./bin/" | sort | $FILTER)
echo General files...
for f in $GENERAL_FILES
do
if [ -e $NEW/$f ]; then
DIFF_OUT=$(diff $OLD/$f $NEW/$f 2>&1)
if [ -n "$DIFF_OUT" ]; then
echo $f
echo "$DIFF_OUT"
fi
fi
done
if [ "x$CMP_ZIPS" == "xtrue" ]; then
ZIPS=$(cd $OLD && find . -type f -name "*.zip" | sort | $FILTER)
if [ -n "$ZIPS" ]; then
echo Zip files...
for f in $ZIPS
do
$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW
if [ "$?" != "0" ]; then
DIFF_RESULT=1
fi
done
fi
fi
if [ "x$CMP_JARS" == "xtrue" ]; then
JARS=$(cd $OLD && find . -type f -name "*.jar" -o -name "ct.sym" | sort | $FILTER)
if [ -n "$JARS" ]; then
echo Jar files...
for f in $JARS
do
DIFFJAR_OUTPUT=`$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW`
DIFFJAR_RESULT=$?
if [ "$DIFFJAR_RESULT" != "0" ]; then
for diff in $LIST_DIFF_JAR; do
DIFFJAR_OUTPUT=`echo "$DIFFJAR_OUTPUT" | grep -v "$diff"`
done
if [ "`echo "$DIFFJAR_OUTPUT" | grep -v "Differing files in"`" != "" ]; then
DIFF_RESULT=1
echo "$DIFFJAR_OUTPUT"
fi
fi
done
fi
fi
if [ "x$FILTER" != "xcat" ]; then
VIEW=view
else
VIEW=
fi
if [ "x$CMP_LIBS" == "xtrue" ]; then
LIBS=$(cd $OLD && find . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | sort | $FILTER)
if [ -n "$LIBS" ]; then
echo Libraries...
for f in $LIBS
do
DIFFLIB_OUTPUT=`$DIFFLIB $OLD/$f $NEW/$f $OLD $NEW $VIEW`
DIFFLIB_RESULT=$?
if [ "$DIFFLIB_RESULT" = "0" ]; then
:
#echo "OK: $DIFFLIB_OUTPUT"
elif [ "$DIFFLIB_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
:
#echo "OK: $DIFFLIB_OUTPUT"
elif [ "$DIFFLIB_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
:
#echo "OK: $DIFFLIB_OUTPUT"
else
echo "$DIFFLIB_OUTPUT"
DIFF_RESULT=1
fi
done
fi
fi
if [ "x$CMP_EXECS" == "xtrue" ]; then
if [ $OSTYPE == "cygwin" ]; then
EXECS=$(cd $OLD && find . -type f -name '*.exe' | sort | $FILTER)
else
EXECS=$(cd $OLD && find . -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' \) | sort | $FILTER)
fi
if [ -n "$EXECS" ]; then
echo Executables...
for f in $EXECS
do
DIFFEXEC_OUTPUT=`$DIFFEXEC $OLD/$f $NEW/$f $OLD $NEW $VIEW`
DIFFEXEC_RESULT=$?
if [ "$DIFFEXEC_RESULT" = "0" ]; then
:
#echo "OK: $DIFFEXEC_OUTPUT"
elif [ "$DIFFEXEC_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
:
#echo "OK: $DIFFEXEC_OUTPUT"
elif [ "$DIFFEXEC_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
:
#echo "OK: $DIFFEXEC_OUTPUT"
else
echo "$DIFFEXEC_OUTPUT"
DIFF_RESULT=1
fi
done
fi
fi
exit $DIFF_RESULT

View File

@@ -1,186 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
if [ $# -lt 2 ]
then
echo "Diff two executables. Return codes:"
echo "0 - no diff"
echo "1 - Identical symbols AND size, BUT not bytewise identical"
echo "2 - Identical symbols BUT NEW size"
echo "3 - Differences, content BUT SAME size"
echo "4 - Differences, content AND size"
echo "10 - Could not perform diff"
echo "Use 'quiet' to disable any output."
echo "Syntax: $0 file1 file2 [quiet]"
exit 10
fi
if [ ! -f $1 ]
then
echo $1 does not exist
exit 10
fi
if [ ! -f $2 ]
then
echo $2 does not exist
exit 10
fi
if [ "`uname`" == "SunOS" ]; then
if [ -f "`which nm`" ]; then
NM=nm
elif [ -f "`which gnm`" ]; then
NM=gnm
else
echo "No nm command found"
exit 10
fi
LDD=ldd
elif [ $OSTYPE == "cygwin" ]; then
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
NM_ARGS=/exports
LDD=
elif [ "`uname`" == "Darwin" ]; then
NM=nm
LDD="otool -L"
else
NM=nm
LDD=ldd
fi
# Should the differences be viewed?
VIEW=
# You can do export DIFF=meld to view
# any differences using meld instead.
if [ -n "$DIFF" ]; then
DIFF="$DIFF"
else
DIFF=diff
fi
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
if [ $# -gt 3 ]
then
ROOT1=$(cd $3 && pwd)
ROOT2=$(cd $4 && pwd)
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
if [ "x$5" == "xview" ]; then VIEW=view; fi
else
ROOT1=$(dirname $OLD)/
ROOT2=$(dirname $NEW)/
OLD_NAME=$OLD
NEW_NAME=$NEW
if [ "x$3" == "xview" ]; then VIEW=view; fi
fi
if cmp $OLD $NEW > /dev/null
then
# The files were bytewise identical.
echo Identical: $OLD_NAME
exit 0
fi
OLD_SYMBOLS=$COMPARE_ROOT/$OLD_NAME.old
NEW_SYMBOLS=$COMPARE_ROOT/$NEW_NAME.new
mkdir -p $(dirname $OLD_SYMBOLS)
mkdir -p $(dirname $NEW_SYMBOLS)
if [ $OSTYPE == "cygwin" ]; then
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full
else
# Strip the addresses, just compare the ordering of the symbols.
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS
# But store the full information for easy diff access.
$NM $OLD > $OLD_SYMBOLS.full
$NM $NEW > $NEW_SYMBOLS.full
fi
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
if [ "${LDD}" ]
then
NAME=`basename $OLD`
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
rm -rf "${TMP}"
mkdir -p "${TMP}"
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
(cd "${TMP}" && rm -f ${NAME})
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
DEP_MSG=
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
DEP_MSG="Identical dependencies"
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
DEP_MSG="Redundant duplicate dependencies added"
RES=1
else
DEP_MSG="DIFFERENT dependencies"
RES=1
fi
fi
RESULT=0
if [ -n "$DIFFS" ]; then
if [ $OLD_SIZE -ne $NEW_SIZE ]
then
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
RESULT=4
else
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
RESULT=3
fi
if [ "x$VIEW" == "xview" ]; then
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS
fi
else
if [ $OLD_SIZE -ne $NEW_SIZE ]
then
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
RESULT=2
else
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
RESULT=1
fi
fi
exit $RESULT

View File

@@ -1,155 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# Simple tool to diff two jar or zip files. It unpacks the jar/zip files and
# reports if files differs and if files are new or missing.
# Assumes gnu diff.
# There are a few source files that have DOS line endings in the
# jaxp/jaxws source drops, when the sources were added to the repository
# the source files were converted to UNIX line endings.
# For now we ignore these differences.
DIFF_FLAGS="--strip-trailing-cr"
#set -x
if [ $# -lt 2 ]
then
echo "Diff two jar/zip files. Return codes: 0 - no diff, 1 - diff, 2 - couldn't perform diff"
echo "Syntax: $0 old_archive new_archive [old_root new_root]"
exit 2
fi
if [ ! -f $1 ]
then
echo $1 does not exist
exit 2
fi
if [ ! -f $2 ]
then
echo $2 does not exist
exit 2
fi
IGNORES="cat"
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
if [ $# -gt 3 ]
then
ROOT1=$(cd $3 && pwd)
ROOT2=$(cd $4 && pwd)
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
if [ $# == 5 ]; then IGNORES="$5"; fi
else
ROOT1=$(dirname $OLD)/
ROOT2=$(dirname $NEW)/
OLD_NAME=$OLD
NEW_NAME=$NEW
if [ $# == 3 ]; then IGNORES="$3"; fi
fi
if [ "`uname`" == "SunOS" ]; then
if [ -f "`which gdiff`" ]; then
DIFF=gdiff
else
DIFF=diff
fi
else
DIFF=diff
fi
OLD_SUFFIX="${OLD##*.}"
NEW_SUFFIX="${NEW##*.}"
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
echo The files do not have the same suffix type!
exit 2
fi
if [ "$OLD_SUFFIX" != "zip" ] && [ "$OLD_SUFFIX" != "jar" ] && [ "$OLD_SUFFIX" != "sym" ]; then
echo The files have to be zip, jar or sym! They are $OLD_SUFFIX
exit 2
fi
UNARCHIVE="unzip -q"
TYPE="$OLD_SUFFIX"
if cmp $OLD $NEW > /dev/null
then
# The files were bytewise identical.
exit 0
fi
# Not quite identical, the might still contain the same data.
# Unpack the jar/zip files in temp dirs
if test "x$COMPARE_ROOT" == "x"; then
COMPARE_ROOT=/tmp/compare_root.$$
REMOVE_COMPARE_ROOT=true
fi
OLD_TEMPDIR=$COMPARE_ROOT/$OLD_NAME.old
NEW_TEMPDIR=$COMPARE_ROOT/$NEW_NAME.new
mkdir -p $OLD_TEMPDIR
mkdir -p $NEW_TEMPDIR
(cd $OLD_TEMPDIR && rm -rf * ; $UNARCHIVE $OLD)
(cd $NEW_TEMPDIR && rm -rf * ; $UNARCHIVE $NEW)
ONLY1=$(LANG=C $DIFF -rq $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $OLD_TEMPDIR")
if [ -n "$ONLY1" ]; then
echo " Only the OLD $OLD_NAME contains:"
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $OLD_TEMPDIR" \
| sed "s|Only in $OLD_TEMPDIR| |"g | sed 's|: |/|g'
fi
ONLY2=$(LANG=C $DIFF -rq $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $NEW_TEMPDIR")
if [ -n "$ONLY2" ]; then
echo " Only the NEW $NEW_NAME contains:"
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep "^Only in $NEW_TEMPDIR" \
| sed "s|Only in $NEW_TEMPDIR| |"g | sed 's|: |/|g'
fi
DIFFTEXT="/bin/bash `dirname $0`/difftext.sh"
LANG=C $DIFF -rq $DIFF_FLAGS $OLD_TEMPDIR $NEW_TEMPDIR | grep differ | cut -f 2,4 -d ' ' | \
awk "{ print \"$DIFFTEXT \"\$1\" \"\$2 }" > $COMPARE_ROOT/diffing
/bin/bash $COMPARE_ROOT/diffing > $COMPARE_ROOT/diffs
if [ -s "$COMPARE_ROOT/diffs" ]; then
echo " Differing files in $OLD_NAME"
cat $COMPARE_ROOT/diffs | grep differ | $IGNORES | cut -f 2 -d ' ' | \
sed "s|$OLD_TEMPDIR| |g"
fi
# Clean up
if [ "x$REMOVE_COMPARE_ROOT" == xtrue ]; then
rm -rf $REMOVE_COMPARE_ROOT
fi
exit 1

View File

@@ -1,207 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# Simple tool to diff two shared libraries.
# Criterias: two shared libraries are considered equal if:
# the file sizes are the same AND the symbols outputs from the nm command are equal
if [ $# -lt 2 ]
then
echo "Diff two shared libs. Return codes:"
echo "0 - no diff"
echo "1 - Identical symbols AND size, BUT not bytewise identical"
echo "2 - Identical symbols BUT NEW size"
echo "3 - Differences, content BUT SAME size"
echo "4 - Differences, content AND size"
echo "10 - Could not perform diff"
echo "Use 'quiet' to disable any output."
echo "Syntax: $0 file1 file2 [quiet]"
exit 10
fi
if [ ! -f $1 ]
then
echo $1 does not exist
exit 10
fi
if [ ! -f $2 ]
then
echo $2 does not exist
exit 10
fi
if [ "`uname`" == "SunOS" ]; then
if [ -f "`which gnm`" ]; then
NM=gnm
# Jonas 2012-05-29: solaris native nm produces radically different output than gnm
# so if using that...we need different filter than "cut -f 2-"
#
elif [ -f "`which nm`" ]; then
NM=nm
else
echo "No nm command found"
exit 10
fi
LDD=ldd
elif [ $OSTYPE == "cygwin" ]; then
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe"
NM_ARGS=/exports
LDD=
elif [ "`uname`" == "Darwin" ]; then
NM=nm
LDD="otool -L"
else
NM=nm
LDD=ldd
fi
# Should the differences be viewed?
VIEW=
# You can do export DIFF=meld to view
# any differences using meld instead.
if [ -n "$DIFF" ]; then
DIFF="$DIFF"
else
DIFF=diff
fi
OLD=$(cd $(dirname $1) && pwd)/$(basename $1)
NEW=$(cd $(dirname $2) && pwd)/$(basename $2)
OLD_SIZE=$(ls -l "$OLD" | awk '{ print $5 }')
NEW_SIZE=$(ls -l "$NEW" | awk '{ print $5 }')
if [ $# -gt 3 ]
then
ROOT1=$(cd $3 && pwd)
ROOT2=$(cd $4 && pwd)
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||")
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||")
if [ "x$5" == "xview" ]; then VIEW=view; fi
else
ROOT1=$(dirname $OLD)/
ROOT2=$(dirname $NEW)/
OLD_NAME=$OLD
NEW_NAME=$NEW
if [ "x$3" == "xview" ]; then VIEW=view; fi
fi
OLD_SUFFIX="${OLD##*.}"
NEW_SUFFIX="${NEW##*.}"
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then
echo The files do not have the same suffix type!
exit 10
fi
if [ "$OLD_SUFFIX" != "so" ] && [ "$OLD_SUFFIX" != "dylib" ] && [ "$OLD_SUFFIX" != "dll" ]; then
echo The files have to be .so, .dylib or .dll! They are $OLD_SUFFIX
exit 10
fi
TYPE="$OLD_SUFFIX"
if cmp $OLD $NEW > /dev/null
then
# The files were bytewise identical.
echo Identical: $OLD_NAME
exit 0
fi
OLD_SYMBOLS=$COMPARE_ROOT/nm.$OLD_NAME.old
NEW_SYMBOLS=$COMPARE_ROOT/nm.$NEW_NAME.new
mkdir -p $(dirname $OLD_SYMBOLS)
mkdir -p $(dirname $NEW_SYMBOLS)
if [ $OSTYPE == "cygwin" ]; then
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full
else
# Strip the addresses, just compare the ordering of the symbols.
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS
# But store the full information for easy diff access.
$NM $OLD > $OLD_SYMBOLS.full
$NM $NEW > $NEW_SYMBOLS.full
fi
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS)
RESULT=0
if [ "${LDD}" ]
then
NAME=`basename $OLD`
TMP=$COMPARE_ROOT/ldd/ldd.${NAME}
rm -rf "${TMP}"
mkdir -p "${TMP}"
(cd "${TMP}" && cp $OLD . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.old | uniq > dep.uniq.old)
(cd "${TMP}" && cp $NEW . && ${LDD} ${NAME} | awk '{ print $1;}' | sort | tee dep.new | uniq > dep.uniq.new)
(cd "${TMP}" && rm -f ${NAME})
DIFFS_DEP=$(LANG=C diff "${TMP}/dep.old" "${TMP}/dep.new")
DIFFS_UNIQ_DEP=$(LANG=C diff "${TMP}/dep.uniq.old" "${TMP}/dep.uniq.new")
DEP_MSG=
if [ -z "${DIFFS_UNIQ_DEP}" -a -z "${DIFFS_DEP}" ]; then
DEP_MSG="Identical dependencies"
elif [ -z "${DIFFS_UNIQ_DEP}" ]; then
DEP_MSG="Redundant duplicate dependencies added"
RES=1
else
DEP_MSG="DIFFERENT dependencies"
RES=1
fi
fi
if [ -n "$DIFFS" ]; then
if [ $OLD_SIZE -ne $NEW_SIZE ]
then
echo Differences, content AND size : $DEP_MSG : $OLD_NAME
RESULT=4
else
echo Differences, content BUT SAME size: $DEP_MSG : $OLD_NAME
RESULT=3
fi
if [ "x$VIEW" == "xview" ]; then
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS
fi
else
if [ $OLD_SIZE -ne $NEW_SIZE ]
then
echo Identical symbols BUT NEW size : $DEP_MSG : $OLD_NAME
RESULT=2
else
echo Identical symbols AND size, BUT not bytewise identical: $DEP_MSG : $OLD_NAME
RESULT=1
fi
fi
exit $RESULT

View File

@@ -1,157 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# The difftext.sh knows how to compare text files and
# ignore some specific differences.
# When difftext.sh is called, we already know that the
# files differ. But if the tests below trigger, then
# we ignore differences caused by:
#
# Timestamps in Java sources generated by idl2java
# Sorting order and cleanup style in .properties files.
OLD="$1"
NEW="$2"
SUF="${OLD##*.}"
TMP=1
if test "x$SUF" == "xjava"; then
TMP=$(LANG=C diff $OLD $NEW | \
grep '^[<>]' | \
sed '/[<>] \* from.*\.idl/d' | \
sed '/[<>] \*.*201[12].*/d' | \
sed '/\/\/ Generated from input file.*/d' | \
sed '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' | \
sed '/\/\/ java GenerateCharacter.*/d')
fi
if test "x$SUF" == "xproperties"; then
cat $OLD | sed -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
-e 's/\\u0020/\x20/g' \
-e 's/\\u003A/\x3A/g' \
-e 's/\\u006B/\x6B/g' \
-e 's/\\u0075/\x75/g' \
-e 's/\\u00A0/\xA0/g' \
-e 's/\\u00A3/\xA3/g' \
-e 's/\\u00B0/\xB0/g' \
-e 's/\\u00B7/\xB7/g' \
-e 's/\\u00BA/\xBA/g' \
-e 's/\\u00BF/\xBF/g' \
-e 's/\\u00C0/\xC0/g' \
-e 's/\\u00C1/\xC1/g' \
-e 's/\\u00C2/\xC2/g' \
-e 's/\\u00C4/\xC4/g' \
-e 's/\\u00C5/\xC5/g' \
-e 's/\\u00C8/\xC8/g' \
-e 's/\\u00C9/\xC9/g' \
-e 's/\\u00CA/\xCA/g' \
-e 's/\\u00CD/\xCD/g' \
-e 's/\\u00CE/\xCE/g' \
-e 's/\\u00D3/\xD3/g' \
-e 's/\\u00D4/\xD4/g' \
-e 's/\\u00D6/\xD6/g' \
-e 's/\\u00DA/\xDA/g' \
-e 's/\\u00DC/\xDC/g' \
-e 's/\\u00DD/\xDD/g' \
-e 's/\\u00DF/\xDF/g' \
-e 's/\\u00E0/\xE0/g' \
-e 's/\\u00E1/\xE1/g' \
-e 's/\\u00E2/\xE2/g' \
-e 's/\\u00E3/\xE3/g' \
-e 's/\\u00E4/\xE4/g' \
-e 's/\\u00E5/\xE5/g' \
-e 's/\\u00E6/\xE6/g' \
-e 's/\\u00E7/\xE7/g' \
-e 's/\\u00E8/\xE8/g' \
-e 's/\\u00E9/\xE9/g' \
-e 's/\\u00EA/\xEA/g' \
-e 's/\\u00EB/\xEB/g' \
-e 's/\\u00EC/\xEC/g' \
-e 's/\\u00ED/\xED/g' \
-e 's/\\u00EE/\xEE/g' \
-e 's/\\u00EF/\xEF/g' \
-e 's/\\u00F1/\xF1/g' \
-e 's/\\u00F2/\xF2/g' \
-e 's/\\u00F3/\xF3/g' \
-e 's/\\u00F4/\xF4/g' \
-e 's/\\u00F5/\xF5/g' \
-e 's/\\u00F6/\xF6/g' \
-e 's/\\u00F9/\xF9/g' \
-e 's/\\u00FA/\xFA/g' \
-e 's/\\u00FC/\xFC/g' \
-e 's/\\u0020/\x20/g' \
-e 's/\\u003f/\x3f/g' \
-e 's/\\u006f/\x6f/g' \
-e 's/\\u0075/\x75/g' \
-e 's/\\u00a0/\xa0/g' \
-e 's/\\u00a3/\xa3/g' \
-e 's/\\u00b0/\xb0/g' \
-e 's/\\u00ba/\xba/g' \
-e 's/\\u00bf/\xbf/g' \
-e 's/\\u00c1/\xc1/g' \
-e 's/\\u00c4/\xc4/g' \
-e 's/\\u00c5/\xc5/g' \
-e 's/\\u00c8/\xc8/g' \
-e 's/\\u00c9/\xc9/g' \
-e 's/\\u00ca/\xca/g' \
-e 's/\\u00cd/\xcd/g' \
-e 's/\\u00d6/\xd6/g' \
-e 's/\\u00dc/\xdc/g' \
-e 's/\\u00dd/\xdd/g' \
-e 's/\\u00df/\xdf/g' \
-e 's/\\u00e0/\xe0/g' \
-e 's/\\u00e1/\xe1/g' \
-e 's/\\u00e2/\xe2/g' \
-e 's/\\u00e3/\xe3/g' \
-e 's/\\u00e4/\xe4/g' \
-e 's/\\u00e5/\xe5/g' \
-e 's/\\u00e7/\xe7/g' \
-e 's/\\u00e8/\xe8/g' \
-e 's/\\u00e9/\xe9/g' \
-e 's/\\u00ea/\xea/g' \
-e 's/\\u00eb/\xeb/g' \
-e 's/\\u00ec/\xec/g' \
-e 's/\\u00ed/\xed/g' \
-e 's/\\u00ee/\xee/g' \
-e 's/\\u00ef/\xef/g' \
-e 's/\\u00f0/\xf0/g' \
-e 's/\\u00f1/\xf1/g' \
-e 's/\\u00f2/\xf2/g' \
-e 's/\\u00f3/\xf3/g' \
-e 's/\\u00f4/\xf4/g' \
-e 's/\\u00f5/\xf5/g' \
-e 's/\\u00f6/\xf6/g' \
-e 's/\\u00f7/\xf7/g' \
-e 's/\\u00f8/\xf8/g' \
-e 's/\\u00f9/\xf9/g' \
-e 's/\\u00fa/\xfa/g' \
-e 's/\\u00fc/\xfc/g' \
-e 's/\\u00ff/\xff/g' \
| sed -e '/^#/d' -e '/^$/d' \
-e :a -e '/\\$/N; s/\\\n//; ta' \
-e 's/^[ \t]*//;s/[ \t]*$//' \
-e 's/\\=/=/' | LANG=C sort > $OLD.cleaned
TMP=$(LANG=C diff $OLD.cleaned $NEW)
fi
if test -n "$TMP"; then
echo Files $OLD and $NEW differ
fi

View File

@@ -1,114 +0,0 @@
#
# Copyright (c) 2012, 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.
#
# List of files inside jar archives that are ok if they differ.
LIST_DIFF_JAR="
/sun/misc/Version.class
/sun/tools/jconsole/Version.class
/com/sun/tools/javac/resources/version.class
/com/sun/tools/javah/resources/version.class
/com/sun/tools/javap/resources/version.class
"
# List of binaries that only need to match symbols
LIST_DIFF_SIZE="
jre/lib/amd64/libfontmanager.so
jre/lib/amd64/libjdwp.so
jre/lib/amd64/libt2k.so
bin/unpack200
jre/bin/unpack200
jre/lib/amd64/libjsig.debuginfo
jre/lib/amd64/libsaproc.debuginfo
jre/lib/amd64/server/libjvm.debuginfo
"
# List of binares that need to match both symbols and size
LIST_DIFF_BYTE="
jre/lib/amd64/libdt_socket.so
jre/lib/amd64/libattach.so
jre/lib/amd64/libjaas_unix.so
jre/lib/amd64/libjawt.so
jre/lib/amd64/libjpeg.so
jre/lib/amd64/libjsdt.so
jre/lib/amd64/libjsig.so
jre/lib/amd64/libsaproc.so
jre/lib/amd64/libsctp.so
jre/lib/amd64/libsunec.so
jre/lib/amd64/libunpack.so
jre/lib/amd64/libverify.so
jre/lib/amd64/libzip.so
jre/lib/amd64/server/libjsig.so
jre/lib/amd64/server/libjvm.so
jre/lib/amd64/liblcms.so
demo/jvmti/heapTracker/lib/libheapTracker.so
demo/jvmti/hprof/lib/libhprof.so
demo/jvmti/minst/lib/libminst.so
demo/jvmti/mtrace/lib/libmtrace.so
demo/jvmti/waiters/lib/libwaiters.so
bin/appletviewer
bin/extcheck
bin/idlj
bin/jar
bin/jarsigner
bin/java
bin/javac
bin/javadoc
bin/javah
bin/javap
bin/jcmd
bin/jconsole
bin/jdb
bin/jhat
bin/jinfo
bin/jmap
bin/jps
bin/jrunscript
bin/jsadebugd
bin/jstack
bin/jstat
bin/jstatd
bin/keytool
bin/native2ascii
bin/orbd
bin/pack200
bin/policytool
bin/rmic
bin/rmid
bin/rmiregistry
bin/schemagen
bin/serialver
bin/servertool
bin/tnameserv
bin/wsgen
bin/wsimport
bin/xjc
jre/bin/java
jre/bin/keytool
jre/bin/orbd
jre/bin/pack200
jre/bin/policytool
jre/bin/rmid
jre/bin/rmiregistry
jre/bin/servertool
jre/bin/tnameserv
"

View File

@@ -1,53 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# Must be bash, but that is ok since we are running from cygwin.
# The first argument is the vcvarsall.bat file to run.
# The second argument is the arch arg to give to vcvars.
VCVARSALL="$1"
ARCH_ARG="$2"
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
# but calculate the difference in Cygwin environment before/after running it and then
# apply the diff.
_vs10varsall=`cygpath -a -m -s "$VCVARSALL"`
_dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
_dosbash=`cygpath -a -w -s \`which bash\`.*`
# generate the set of exported vars before/after the vs10 setup
echo "@echo off" > localdevenvtmp.bat
echo "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
echo "call $_dosvs10varsall $ARCH_ARG" >> localdevenvtmp.bat
echo "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
cmd /c localdevenvtmp.bat
# apply the diff (less some non-vs10 vars named by "!")
sort localdevenvtmp.export0 |grep -v "!" > localdevenvtmp.export0.sort
sort localdevenvtmp.export1 |grep -v "!" > localdevenvtmp.export1.sort
comm -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
cat localdevenv.sh | sed 's/declare -x /export /g' | sed 's/="/:="/g' | sed 's/\\\\/\\/g' | sed 's/"//g' | \
sed 's/#/\$\(HASH\)/g' > localdevenv.gmk
# cleanup
rm -f localdevenvtmp*

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# #
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

View File

@@ -0,0 +1,47 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# Usage: sh shell-tracer.sh <TIME_CMD> <OUTPUT_FILE> <OLD_SHELL> <shell command line>
#
# This shell script is supposed to be set as a replacement for SHELL in make,
# causing it to be called whenever make wants to execute shell commands.
# The <shell command line> is suitable for passing on to the old shell,
# typically beginning with -c.
#
# This script will make sure the shell command line is executed with
# OLD_SHELL -x, and it will also store a simple log of the the time it takes to
# execute the command in the OUTPUT_FILE, using the "time" utility as pointed
# to by TIME_CMD. If TIME_CMD is "-", no timestamp will be stored.
TIME_CMD="$1"
OUTPUT_FILE="$2"
OLD_SHELL="$3"
shift
shift
shift
if [ "$TIME_CMD" != "-" ]; then
"$TIME_CMD" -f "[TIME:%E] $*" -a -o "$OUTPUT_FILE" "$OLD_SHELL" -x "$@"
else
"$OLD_SHELL" -x "$@"
fi

184
common/bin/test_builds.sh Normal file
View File

@@ -0,0 +1,184 @@
#!/bin/bash
set -x
set -e
options="$*"
option="$1"
tmp=/tmp/test_builds.$$
rm -f -r ${tmp}
mkdir -p ${tmp}
errMessages=${tmp}/error_messages.txt
#######
# Error function
error() # message
{
echo "ERROR: $1" | tee -a ${errMessages}
}
# Check errors
checkErrors()
{
if [ -s ${errMessages} ] ; then
cat ${errMessages}
exit 1
fi
}
#######
os="`uname -s`"
arch="`uname -p`"
make=make
if [ "${os}" = "SunOS" ] ; then
make=gmake
export J7="/opt/java/jdk1.7.0"
elif [ "${os}" = "Darwin" ] ; then
export J7="/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home"
elif [ "${os}" = "Linux" -a "${arch}" = "x86_64" ] ; then
export J7="/usr/lib/jvm/java-7-openjdk-amd64/"
else
echo "What os/arch is this: ${os}/${arch}"
exit 1
fi
# Must have a jdk7
if [ ! -d ${J7} ] ; then
echo "No JDK7 found at: ${J7}"
exit 1
fi
# What sources we use
fromroot="http://hg.openjdk.java.net/build-infra/jdk8"
# Where we do it
root="testbuilds"
mkdir -p ${root}
# Three areas, last three are cloned from first to insure sameness
t0=${root}/t0
t1=${root}/t1
t2=${root}/t2
t3=${root}/t3
repolist="${t0} ${t1} ${t2} ${t3}"
# Optional complete clobber
if [ "${option}" = "clobber" ] ; then
for i in ${repolist} ; do
rm -f -r ${i}
done
fi
# Get top repos
if [ ! -d ${t0}/.hg ] ; then
rm -f -r ${t0}
hg clone ${fromroot} ${t0}
fi
for i in ${t1} ${t2} ${t3} ; do
if [ ! -d ${i}/.hg ] ; then
hg clone ${t0} ${i}
fi
done
# Get repos updated
for i in ${repolist} ; do
( \
set -e \
&& cd ${i} \
&& sh ./get_source.sh \
|| error "Cannot get source" \
) 2>&1 | tee ${i}.get_source.txt
checkErrors
done
# Optional clean
if [ "${option}" = "clean" ] ; then
for i in ${repolist} ; do
rm -f -r ${i}/build
rm -f -r ${i}/*/build
rm -f -r ${i}/*/dist
done
fi
# Check changes on working set files
for i in ${repolist} ; do
( \
set -e \
&& cd ${i} \
&& sh ./make/scripts/hgforest.sh status \
|| error "Cannot check status" \
) 2>&1 | tee ${i}.hg.status.txt
checkErrors
done
# Configure for build-infra building
for i in ${t1} ${t2} ; do
( \
set -e \
&& cd ${i}/common/makefiles \
&& sh ../autoconf/configure --with-boot-jdk=${J7} \
|| error "Cannot configure" \
) 2>&1 | tee ${i}.config.txt
checkErrors
done
# Do build-infra builds
for i in ${t1} ${t2} ; do
( \
set -e \
&& cd ${i}/common/makefiles \
&& ${make} \
FULL_VERSION:=1.8.0-internal-b00 \
JRE_RELEASE_VERSION:=1.8.0-internal-b00 \
USER_RELEASE_SUFFIX:=compare \
RELEASE:=1.8.0-internal \
VERBOSE= \
LIBARCH= \
all images \
|| error "Cannot build" \
) 2>&1 | tee ${i}.build.txt
checkErrors
done
# Compare build-infra builds
( \
sh ${t0}/common/bin/compareimage.sh \
${t1}/build/*/images/j2sdk-image \
${t2}/build/*/images/j2sdk-image \
|| error "Cannot compare" \
) 2>&1 | tee ${root}/build-infra-comparison.txt
checkErrors
# Do old build
unset JAVA_HOME
export ALT_BOOTDIR="${J7}"
( \
cd ${t3} \
&& ${make} FULL_VERSION='"1.8.0-internal" sanity \
|| error "Cannot sanity" \
) 2>&1 | tee ${t3}.sanity.txt
checkErrors
( \
cd ${t3} \
&& ${make} \
FULL_VERSION='"1.8.0-internal" \
JRE_RELEASE_VERSION:=1.8.0-internal-b00 \
USER_RELEASE_SUFFIX:=compare \
RELEASE:=1.8.0-internal \
|| error "Cannot build old way" \
) 2>&1 | tee ${t3}.build.txt
checkErrors
# Compare old build to build-infra build
( \
sh ${t0}/common/bin/compareimage.sh \
${t3}/build/*/j2sdk-image \
${t1}/build/*/images/j2sdk-image \
|| error "Cannot compare" \
) 2>&1 | tee ${root}/build-comparison.txt
checkErrors
exit 0

View File

@@ -0,0 +1,52 @@
#
# Copyright (c) 2011, 2012, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
# Include the legacy hotspot-spec.gmk (which in turns includes spec.gmk)
BASE_SPEC:=$(SPEC)
include $(dir $(SPEC))hotspot-spec.gmk
include MakeBase.gmk
# Inclusion of this pseudo-target will cause make to execute this file
# serially, regardless of -j. Recursively called makefiles will not be
# affected, however. This is required for correct dependency management.
.NOTPARALLEL:
default: all
# Get all files except .hg in the hotspot directory.
HOTSPOT_FILES := $(shell $(FIND) -L $(HOTSPOT_TOPDIR) -name ".hg" -prune -o -print)
# The old build creates hotspot output dir before calling hotspot and
# not doing it breaks builds on msys.
$(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp: $(HOTSPOT_FILES)
@$(MKDIR) -p $(HOTSPOT_OUTPUTDIR)
@($(CD) $(HOTSPOT_TOPDIR)/make && $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) SPEC=$(HOTSPOT_SPEC) BASE_SPEC=$(BASE_SPEC))
$(TOUCH) $@
hotspot: $(HOTSPOT_OUTPUTDIR)/_hotspot.timestamp
all: hotspot
.PHONY: default all hotspot

View File

@@ -59,7 +59,7 @@ define add_idl_package
$(MKDIR) -p $3/$$($4_TMPDIR) $(MKDIR) -p $3/$$($4_TMPDIR)
$(RM) -rf $3/$$($4_TMPDIR) $(RM) -rf $3/$$($4_TMPDIR)
$(MKDIR) -p $(dir $5) $(MKDIR) -p $(dir $5)
$(ECHO) Compiling IDL $(patsubst $2/%,%,$4) $(ECHO) $(LOG_INFO) Compiling IDL $(patsubst $2/%,%,$4)
$8 -td $3/$$($4_TMPDIR) \ $8 -td $3/$$($4_TMPDIR) \
-i $2/org/omg/CORBA \ -i $2/org/omg/CORBA \
-i $2/org/omg/PortableInterceptor \ -i $2/org/omg/PortableInterceptor \
@@ -79,15 +79,9 @@ define SetupIdlCompilation
# param 1 is for example BUILD_IDLS # param 1 is for example BUILD_IDLS
# param 2,3,4,5,6,7,8 are named args. # param 2,3,4,5,6,7,8 are named args.
# IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES # IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
$(if $2,$1_$(strip $2)) $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
$(if $3,$1_$(strip $3)) $(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
$(if $4,$1_$(strip $4)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
$(if $5,$1_$(strip $5))
$(if $6,$1_$(strip $6))
$(if $7,$1_$(strip $7))
$(if $8,$1_$(strip $8))
$(if $9,$1_$(strip $9))
$(if $(10),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
# Remove any relative addressing in the paths. # Remove any relative addressing in the paths.
$1_SRC := $$(abspath $$($1_SRC)) $1_SRC := $$(abspath $$($1_SRC))

File diff suppressed because it is too large Load Diff

208
common/makefiles/Main.gmk Normal file
View File

@@ -0,0 +1,208 @@
#
# Copyright (c) 2011, 2012, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file.
# Now load the spec
include $(SPEC)
# Load the vital tools for all the makefiles.
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
# Include the corresponding custom file, if present.
-include $(CUSTOM_MAKE_DIR)/Main.gmk
### Clean up from previous run
# Remove any build.log from a previous run, if they exist
ifneq (,$(BUILD_LOG))
ifneq (,$(BUILD_LOG_PREVIOUS))
# Rotate old log
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
else
$(shell $(RM) $(BUILD_LOG) 2> /dev/null)
endif
$(shell $(RM) $(OUTPUT_ROOT)/build-trace-time.log 2> /dev/null)
endif
# Remove any javac server logs and port files. This
# prevents a new make run to reuse the previous servers.
ifneq (,$(SJAVAC_SERVER_DIR))
$(shell $(MKDIR) -p $(SJAVAC_SERVER_DIR) && $(RM) -rf $(SJAVAC_SERVER_DIR)/*)
endif
# Reset the build timers.
$(eval $(call ResetAllTimers))
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
# hence this workaround.
ifeq ($(JOBS),)
JOBS=$(NUM_CORES)
endif
MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS)
### Main targets
all: jdk
start-make:
@$(call AtMakeStart)
langtools: langtools-only
langtools-only: start-make
@$(call TargetEnter)
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildLangtools.gmk)
@$(call TargetExit)
corba: langtools corba-only
corba-only: start-make
@$(call TargetEnter)
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildCorba.gmk)
@$(call TargetExit)
jaxp: langtools jaxp-only
jaxp-only: start-make
@$(call TargetEnter)
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxp.gmk)
@$(call TargetExit)
jaxws: langtools jaxp jaxws-only
jaxws-only: start-make
@$(call TargetEnter)
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJaxws.gmk)
@$(call TargetExit)
hotspot: hotspot-only
hotspot-only: start-make
@$(call TargetEnter)
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
@$(call TargetExit)
jdk: langtools hotspot corba jaxp jaxws jdk-only
jdk-only: start-make
@$(call TargetEnter)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk $(JDK_TARGET))
@$(call TargetExit)
demos: jdk demos-only
demos-only: start-make
@$(call TargetEnter)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk demos)
@$(call TargetExit)
images: source-tips demos images-only
images-only: start-make
@$(call TargetEnter)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
@$(call TargetExit)
overlay-images: source-tips demos overlay-images-only
overlay-images-only: start-make
@$(call TargetEnter)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk overlay-images)
@$(call TargetExit)
bundles: images bundles-only
bundles-only: start-make
@$(call TargetEnter)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk bundles)
@$(call TargetExit)
install: images install-only
install-only: start-make
@$(call TargetEnter)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk install)
@$(call TargetExit)
docs: jdk docs-only
docs-only: start-make
@$(call TargetEnter)
@($(CD) $(SRC_ROOT)/common/makefiles/javadoc && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
@$(call TargetExit)
bootcycle-images:
@$(ECHO) Boot cycle build step 1: Building the JDK image normally
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(SPEC) images)
@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)
test: start-make
@$(call TargetEnter)
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
@$(call TargetExit)
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
# used to track the exact sources used to build that image.
source-tips: $(OUTPUT_ROOT)/source_tips
$(OUTPUT_ROOT)/source_tips: FRC
@$(MKDIR) -p $(@D)
@$(RM) $@
@$(if $(HG),$(call GetSourceTips),$(ECHO) "hg not installed" > $@)
# Remove everything, except the output from configure.
clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
@$(ECHO) Cleaned all build artifacts.
# Remove everything, including configure configuration.
# If the output directory was created by configure and now becomes empty, remove it as well.
# FIXME: tmp should not be here, fix ResetTimers instead. And remove spec.sh!
dist-clean: clean
@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp)
@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\
else \
($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
fi \
)
@$(ECHO) Cleaned everything, you will have to re-run configure.
clean-langtools:
$(call CleanComponent,langtools)
clean-corba:
$(call CleanComponent,corba)
clean-jaxp:
$(call CleanComponent,jaxp)
clean-jaxws:
$(call CleanComponent,jaxws)
clean-hotspot:
$(call CleanComponent,hotspot)
clean-jdk:
$(call CleanComponent,jdk)
clean-images:
$(call CleanComponent,images)
clean-overlay-images:
$(call CleanComponent,overlay-images)
clean-bootcycle-build:
$(call CleanComponent,bootcycle-build)
.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only
.PHONY: all test clean dist-clean bootcycle-images start-make
.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
FRC: # Force target

View File

@@ -33,129 +33,13 @@
ifndef _MAKEBASE_GMK ifndef _MAKEBASE_GMK
_MAKEBASE_GMK := 1 _MAKEBASE_GMK := 1
ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Please upgrade to 3.81 or newer.)
endif
endif
ifneq (,$(CYGPATH))
# Cygwin styff, if needed but most is going to be
# done in configure!
ifeq (yes,$(CHECK_FOR_VCINSTALLDIR))
ifeq (,$(VCINSTALLDIR))
$(info Could not find compiler paths!)
$(info You probably configured the build from within a)
$(info VS command prompt, but you are not using such a)
$(info prompt right now.)
$(info If you instead run configure from a plain cygwin shell, it)
$(info will attempt to setup VS for you! Please try that.)
$(error Giving up for now.)
endif
endif
endif
# The build times report is turned off by setting REPORT_BUILD_TIMES to nothing.
# This is necessary for the target clean which will erase the
# directories where the buildtimes are stored.
REPORT_BUILD_TIMES=1
# Store the build times in this directory.
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
# Record starting time for build of a sub repository.
define RecordStartTime
$(MKDIR) -p $(BUILDTIMESDIR)
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
endef
# Indicate that we started to build a sub repository and record starting time.
define MakeStart
$(call RecordStartTime,$1)
$(BUILD_LOG_WRAPPER) $(PRINTF) "\n\n%s\n%s\n##### %-60.60s #####\n%s\n\n" \
"########################################################################" \
"########################################################################" \
"Entering $1 for target(s) $2" \
"########################################################################"
endef
# Record ending time and calculate the difference and store it in a
# easy to read format. Handles builds that cross midnight. Expects
# that a build will never take 24 hours or more.
define RecordEndTime
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
> $(BUILDTIMESDIR)/build_time_diff_$1
endef
# Check if the current target is the final target, as specified by
# the user on the command line. If so, call PrintEndMessage.
define CheckIfFinished
$(if $(filter $@,$(MAKECMDGOALS)),$(call PrintEndMessage))
# If no taget is given, "all" is default. Check for that, too.
# At most one of the tests can be true.
$(if $(MAKECMDGOALS),,$(if $(filter $@,all),$(call PrintEndMessage)))
endef
# Indicate that we are done.
# Record ending time and print out the total time it took to build.
define MakeFinish
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,$1),)
$(BUILD_LOG_WRAPPER) $(PRINTF) "%s\n##### %-60.60s #####\n%s\n##### %-60.60s #####\n%s\n\n" \
"########################################################################" \
"Leaving $1 for target(s) $2" \
"########################################################################" \
$(if $(REPORT_BUILD_TIMES),"Build time `$(CAT) $(BUILDTIMESDIR)/build_time_diff_$1` for target(s) $2","") \
"########################################################################"
$(call CheckIfFinished)
endef
# Find all build_time_* files and print their contents in a list sorted
# on the name of the sub repository.
define ReportBuildTimes
$(BUILD_LOG_WRAPPER) $(PRINTF) -- "-- Build times ----------\nTarget %s\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
"$1" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
endef
define ResetTimers
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
endef
define StartTimer
$(call RecordStartTime,TOTAL)
endef
define StopTimer
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),)
endef
# Hook to be called as the very first thing when running a normal build
define AtRootMakeStart
$(if $(findstring -j,$(MAKEFLAGS)), $(error make -j is not supported, use make JOBS=n))
$(call PrintStartMessage)
$(call StartTimer)
endef
# Hook to be called as the very last thing for targets that are "top level" targets
define AtRootMakeEnd
$(call StopTimer)
$(call CheckIfFinished)
endef
# If the variable that you want to send to stdout for piping into a file or otherwise, # If the variable that you want to send to stdout for piping into a file or otherwise,
# is potentially long, for example the a list of file paths, eg a list of all package directories. # is potentially long, for example the a list of file paths, eg a list of all package directories.
# Then you need to use ListPathsSafely, which optimistically splits the output into several shell # Then you need to use ListPathsSafely, which optimistically splits the output into several shell
# calls as well as use compression on recurrent file paths segments, to get around the potential # calls as well as use compression on recurrent file paths segments, to get around the potential
# command line length problem that exists in cygwin and other shells. # command line length problem that exists in cygwin and other shells.
compress_pre:=$(strip $(shell cat $(SRC_ROOT)/common/makefiles/compress.pre)) compress_pre:=$(strip $(shell $(CAT) $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-pre-compress.incl))
compress_post:=$(strip $(shell cat $(SRC_ROOT)/common/makefiles/compress.post)) compress_post:=$(strip $(shell $(CAT) $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-post-compress.incl))
compress_paths=$(compress_pre)\ compress_paths=$(compress_pre)\
$(subst $(SRC_ROOT),X97,\ $(subst $(SRC_ROOT),X97,\
$(subst $(OUTPUT_ROOT),X98,\ $(subst $(OUTPUT_ROOT),X98,\
@@ -163,7 +47,7 @@ $(subst X,X00,\
$(subst $(SPACE),\n,$(strip $1)))))\ $(subst $(SPACE),\n,$(strip $1)))))\
$(compress_post) $(compress_post)
decompress_paths=sed -f $(SRC_ROOT)/common/makefiles/uncompress.sed -e 's|X99|\\n|g' \ decompress_paths=$(SED) -f $(SRC_ROOT)/common/makefiles/support/ListPathsSafely-uncompress.sed -e 's|X99|\\n|g' \
-e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \ -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
-e 's|X00|X|g' | tr '\n' '$2' -e 's|X00|X|g' | tr '\n' '$2'
@@ -384,14 +268,67 @@ $(ECHO) $1/$(HGTIP_FILENAME)
endef endef
define SetupLogging define SetupLogging
ifneq ($(findstring $(LOG),debug trace),) ifeq ($$(LOG), trace)
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
# For each target executed, will print
# Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
# but with a limit of 20 on <ALL NEWER PREREQUISITES>, to avoid cluttering logs too much (and causing a crash on Cygwin).
OLD_SHELL:=$$(SHELL) OLD_SHELL:=$$(SHELL)
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x WRAPPER_SHELL:=$$(OLD_SHELL) $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(TIME),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log $$(OLD_SHELL)
SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL)
endif
# Never remove warning messages; this is just for completeness
LOG_WARN=
ifneq ($$(findstring $$(LOG),info debug trace),)
LOG_INFO=
else
LOG_INFO=> /dev/null
endif
ifneq ($$(findstring $$(LOG),debug trace),)
LOG_DEBUG=
else
LOG_DEBUG=> /dev/null
endif
ifneq ($$(findstring $$(LOG),trace),)
LOG_TRACE=
else
LOG_TRACE=> /dev/null
endif endif
endef endef
# Make sure logging is setup for everyone that includes MakeBase.gmk. # Make sure logging is setup for everyone that includes MakeBase.gmk.
$(eval $(call SetupLogging)) $(eval $(call SetupLogging))
# This is to be called by all SetupFoo macros
define LogSetupMacroEntry
$(if $(26),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
$(if $(findstring $(LOG),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
endef
# Make directory without forking mkdir if not needed
define MakeDir
ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9))
$$(shell $(MKDIR) -p $1 $2 $3 $4 $5 $6 $7 $8 $9)
endif
endef
ifeq ($(OPENJDK_TARGET_OS),solaris)
# On Solaris, if the target is a symlink and exists, cp won't overwrite.
define install-file
$(MKDIR) -p $(@D)
$(RM) '$@'
$(CP) -f -r -P '$<' '$(@D)'
endef
else ifeq ($(OPENJDK_TARGET_OS),macosx)
define install-file
$(MKDIR) -p $(@D)
$(CP) -fpRP '$<' '$@'
endef
else
define install-file
$(MKDIR) -p $(@D)
$(CP) -fP '$<' '$@'
endef
endif
endif # _MAKEBASE_GMK endif # _MAKEBASE_GMK

View File

@@ -45,123 +45,17 @@ MAKE_ARGS=$(foreach var,$(subst =command,,$(filter %=command,$(foreach var,$(.VA
list_alt_overrides_with_origins=$(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var))))) list_alt_overrides_with_origins=$(filter ALT_%=environment ALT_%=command,$(foreach var,$(.VARIABLES),$(var)=$(firstword $(origin $(var)))))
list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins))) list_alt_overrides=$(subst =command,,$(subst =environment,,$(list_alt_overrides_with_origins)))
# Store the build times in this directory.
BUILDTIMESDIR=$(OUTPUT_ROOT)/tmp/buildtimes
# Global targets are possible to run either with or without a SPEC. The prototypical
# global target is "help".
global_targets=help configure
############################## ##############################
# Functions # Functions
############################## ##############################
define fatal-error
# If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
$$(if $$(findstring help,$$(MAKECMDGOALS)),,$$(error Cannot continue))
endef
define ParseLogLevel
ifeq ($$(origin VERBOSE),undefined)
# Setup logging according to LOG (but only if VERBOSE is not given)
ifeq ($$(LOG),)
# Set LOG to "warn" as default if not set (and no VERBOSE given)
LOG=warn
endif
ifeq ($$(LOG),warn)
VERBOSE=-s
else ifeq ($$(LOG),info)
VERBOSE=
else ifeq ($$(LOG),debug)
VERBOSE=
else ifeq ($$(LOG),trace)
VERBOSE=-d -p
else
$$(info Error: LOG must be one of: warn, info, debug or trace.)
$$(eval $$(call fatal-error))
endif
else
ifneq ($$(LOG),)
# We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0)
$$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
$$(eval $$(call fatal-error))
endif
endif
endif
endef
# TODO: Fix duplication in MakeBase.gmk
define SetupLogging
ifneq ($(findstring $(LOG),debug trace),)
# Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
OLD_SHELL:=$$(SHELL)
SHELL = $$(warning Building $$@$$(if $$<, (from $$<))$(if $$?, ($$? newer)))$$(OLD_SHELL) -x
endif
endef
define ParseConfAndSpec
ifneq ($$(origin SPEC),undefined)
# We have been given a SPEC, check that it works out properly
ifeq ($$(wildcard $$(SPEC)),)
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
$$(eval $$(call fatal-error))
endif
ifneq ($$(origin CONF),undefined)
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0)
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
$$(eval $$(call fatal-error))
endif
endif
# ... OK, we're satisfied, we'll use this SPEC later on
else
# Find all spec.gmk files in the build output directory
output_dir=$$(root_dir)/build
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
ifeq ($$(all_spec_files),)
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
$$(eval $$(call fatal-error))
endif
# Extract the configuration names from the path
all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
ifneq ($$(origin CONF),undefined)
# User have given a CONF= argument.
ifeq ($$(CONF),)
# If given CONF=, match all configurations
matching_confs=$$(strip $$(all_confs))
else
# Otherwise select those that contain the given CONF string
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
endif
ifeq ($$(matching_confs),)
$$(info No configurations found matching CONF=$$(CONF))
$$(info Available configurations:)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(eval $$(call fatal-error))
else
ifeq ($$(words $$(matching_confs)),1)
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
else
$$(info Building the following configurations (matching CONF=$$(CONF)):)
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
endif
endif
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
else
# No CONF or SPEC given, check the available configurations
ifneq ($$(words $$(all_spec_files)),1)
$$(info No CONF or SPEC given, but more than one spec.gmk found in $$(output_dir).)
$$(info Available configurations:)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(info Please retry building with CONF=<config> or SPEC=<specfile>)
$$(eval $$(call fatal-error))
endif
# We found exactly one configuration, use it
SPEC=$$(strip $$(all_spec_files))
endif
endif
endef
define CheckEnvironment define CheckEnvironment
# Find all environment or command line variables that begin with ALT. # Find all environment or command line variables that begin with ALT.
$(if $(list_alt_overrides), $(if $(list_alt_overrides),
@@ -171,15 +65,237 @@ define CheckEnvironment
) )
endef endef
define PrintStartMessage ### Functions for timers
$(if $(VERBOSE),,@$(ECHO) Running make as $(MAKE) $(MFLAGS) $(MAKE_ARGS))
$(call CheckEnvironment) # Record starting time for build of a sub repository.
@$(ECHO) "Building OpenJDK for target $(if $(MAKECMDGOALS),'$(MAKECMDGOALS)','all') in configuration '$(CONF_NAME)'" define RecordStartTime
$(MKDIR) -p $(BUILDTIMESDIR)
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$1
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$1_human_readable
endef endef
define PrintEndMessage # Record ending time and calculate the difference and store it in a
@$(ECHO) "Finished building OpenJDK for target '$@'" # easy to read format. Handles builds that cross midnight. Expects
# that a build will never take 24 hours or more.
define RecordEndTime
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$1
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$1_human_readable
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$1` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$1` $1 | \
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
> $(BUILDTIMESDIR)/build_time_diff_$1
endef
# Find all build_time_* files and print their contents in a list sorted
# on the name of the sub repository.
define ReportBuildTimes
$(BUILD_LOG_WRAPPER) $(PRINTF) -- "----- Build times -------\nStart %s\nEnd %s\n%s\n%s\n-------------------------\n" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_start_TOTAL_human_readable`" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_end_TOTAL_human_readable`" \
"`$(LS) $(BUILDTIMESDIR)/build_time_diff_* | $(GREP) -v _TOTAL | $(XARGS) $(CAT) | $(SORT) -k 2`" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_TOTAL`"
endef
define ResetAllTimers
$$(shell $(MKDIR) -p $(BUILDTIMESDIR) && $(RM) $(BUILDTIMESDIR)/build_time_*)
endef
define StartGlobalTimer
$(call RecordStartTime,TOTAL)
endef
define StopGlobalTimer
$(call RecordEndTime,TOTAL)
endef
### Functions for managing makefile structure (start/end of makefile and individual targets)
# Do not indent this function, this will add whitespace at the start which the caller won't handle
define GetRealTarget
$(strip $(if $(MAKECMDGOALS),$(MAKECMDGOALS),all))
endef
# Do not indent this function, this will add whitespace at the start which the caller won't handle
define LastGoal
$(strip $(lastword $(call GetRealTarget)))
endef
# Check if the current target is the final target, as specified by
# the user on the command line. If so, call AtRootMakeEnd.
define CheckIfMakeAtEnd
# Check if the current target is the last goal
$(if $(filter $@,$(call LastGoal)),$(call AtMakeEnd))
# If the target is 'foo-only', check if our goal was stated as 'foo'
$(if $(filter $(patsubst %-only,%,$@),$(call LastGoal)),$(call AtMakeEnd))
# If no goal is given, 'all' is default, but the last target executed for all is 'jdk-only'. Check for that, too.
# At most one of the tests can be true.
$(if $(subst all,,$(call LastGoal)),,$(if $(filter $@,jdk-only),$(call AtMakeEnd)))
endef
# Hook to be called when starting to execute a top-level target
define TargetEnter
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Starting $(patsubst %-only,%,$@)\n"
$(call RecordStartTime,$(patsubst %-only,%,$@))
endef
# Hook to be called when finish executing a top-level target
define TargetExit
$(call RecordEndTime,$(patsubst %-only,%,$@))
$(BUILD_LOG_WRAPPER) $(PRINTF) "## Finished $(patsubst %-only,%,$@) (build time %s)\n\n" \
"`$(CAT) $(BUILDTIMESDIR)/build_time_diff_$(patsubst %-only,%,$@) | $(CUT) -f 1 -d " "`"
$(call CheckIfMakeAtEnd)
endef
# Hook to be called as the very first thing when running a normal build
define AtMakeStart
$(if $(findstring --jobserver,$(MAKEFLAGS)),$(error make -j is not supported, use make JOBS=n))
$(call CheckEnvironment) $(call CheckEnvironment)
@$(PRINTF) $(LOG_INFO) "Running make as '$(MAKE) $(MFLAGS) $(MAKE_ARGS)'\n"
@$(PRINTF) "Building $(PRODUCT_NAME) for target '$(call GetRealTarget)' in configuration '$(CONF_NAME)'\n\n"
$(call StartGlobalTimer)
endef
# Hook to be called as the very last thing for targets that are "top level" targets
define AtMakeEnd
$(if $(SJAVAC_SERVER_DIR),@$(RM) -rf $(SJAVAC_SERVER_DIR)/*.port)
$(call StopGlobalTimer)
$(call ReportBuildTimes)
@$(PRINTF) "Finished building $(PRODUCT_NAME) for target '$(call GetRealTarget)'\n"
$(call CheckEnvironment)
endef
### Functions for parsing and setting up make options from command-line
define FatalError
# If the user specificed a "global" target (e.g. 'help'), do not exit but continue running
$$(if $$(filter-out $(global_targets),$$(call GetRealTarget)),$$(error Cannot continue))
endef
define ParseLogLevel
ifeq ($$(origin VERBOSE),undefined)
# Setup logging according to LOG (but only if VERBOSE is not given)
# If the "nofile" argument is given, act on it and strip it away
ifneq ($$(findstring nofile,$$(LOG)),)
# Reset the build log wrapper, regardless of other values
override BUILD_LOG_WRAPPER=
# COMMA is defined in spec.gmk, but that is not included yet
COMMA=,
# First try to remove ",nofile" if it exists
LOG_STRIPPED1=$$(subst $$(COMMA)nofile,,$$(LOG))
# Otherwise just remove "nofile"
LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
# We might have ended up with a leading comma. Remove it
LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
override LOG:=$$(LOG_STRIPPED3)
endif
ifeq ($$(LOG),)
# Set LOG to "warn" as default if not set (and no VERBOSE given)
override LOG=warn
endif
ifeq ($$(LOG),warn)
VERBOSE=-s
else ifeq ($$(LOG),info)
VERBOSE=-s
else ifeq ($$(LOG),debug)
VERBOSE=
else ifeq ($$(LOG),trace)
VERBOSE=
else
$$(info Error: LOG must be one of: warn, info, debug or trace.)
$$(eval $$(call FatalError))
endif
else
ifneq ($$(LOG),)
# We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0)
$$(info Cannot use LOG=$$(LOG) and VERBOSE=$$(VERBOSE) at the same time. Choose one.)
$$(eval $$(call FatalError))
endif
endif
endif
endef
define ParseConfAndSpec
ifneq ($$(filter-out $(global_targets),$$(call GetRealTarget)),)
# If we only have global targets, no need to bother with SPEC or CONF
ifneq ($$(origin SPEC),undefined)
# We have been given a SPEC, check that it works out properly
ifeq ($$(wildcard $$(SPEC)),)
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
$$(eval $$(call FatalError))
endif
ifneq ($$(origin CONF),undefined)
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
# but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0)
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
$$(eval $$(call FatalError))
endif
endif
# ... OK, we're satisfied, we'll use this SPEC later on
else
# Find all spec.gmk files in the build output directory
output_dir=$$(root_dir)/build
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
ifeq ($$(all_spec_files),)
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
$$(eval $$(call FatalError))
endif
# Extract the configuration names from the path
all_confs=$$(patsubst %/spec.gmk,%,$$(patsubst $$(output_dir)/%,%,$$(all_spec_files)))
ifneq ($$(origin CONF),undefined)
# User have given a CONF= argument.
ifeq ($$(CONF),)
# If given CONF=, match all configurations
matching_confs=$$(strip $$(all_confs))
else
# Otherwise select those that contain the given CONF string
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
endif
ifeq ($$(matching_confs),)
$$(info No configurations found matching CONF=$$(CONF))
$$(info Available configurations:)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(eval $$(call FatalError))
else
ifeq ($$(words $$(matching_confs)),1)
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
else
$$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
endif
endif
# Create a SPEC definition. This will contain the path to one or more spec.gmk files.
SPEC=$$(addsuffix /spec.gmk,$$(addprefix $$(output_dir)/,$$(matching_confs)))
else
# No CONF or SPEC given, check the available configurations
ifneq ($$(words $$(all_spec_files)),1)
$$(info No CONF given, but more than one configuration found in $$(output_dir).)
$$(info Available configurations:)
$$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
$$(eval $$(call FatalError))
endif
# We found exactly one configuration, use it
SPEC=$$(strip $$(all_spec_files))
endif
endif
endif
endef
### Convenience functions from Main.gmk
# Cleans the component given as $1
define CleanComponent
@$(PRINTF) "Cleaning $1 build artifacts ..."
@($(CD) $(OUTPUT_ROOT) && $(RM) -r $1)
@$(PRINTF) " done\n"
endef endef
endif # _MAKEHELPERS_GMK endif # _MAKEHELPERS_GMK

View File

@@ -24,7 +24,23 @@
# #
# This must be the first rule # This must be the first rule
default: all all:
# Inclusion of this pseudo-target will cause make to execute this file
# serially, regardless of -j. Recursively called makefiles will not be
# affected, however. This is required for correct dependency management.
.NOTPARALLEL:
# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
# /usr/ccs/bin/make lacks basically every other flow control mechanism.
TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
# Assume we have GNU make, but check version.
ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
endif
endif
# Locate this Makefile # Locate this Makefile
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
@@ -38,156 +54,32 @@ root_dir:=$(patsubst %/common/makefiles/Makefile,%,$(makefile_path))
include $(dir $(makefile_path))/MakeHelpers.gmk include $(dir $(makefile_path))/MakeHelpers.gmk
$(eval $(call ParseLogLevel)) $(eval $(call ParseLogLevel))
$(eval $(call SetupLogging))
$(eval $(call ParseConfAndSpec)) $(eval $(call ParseConfAndSpec))
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line, # Now determine if we have zero, one or several configurations to build.
# hence this workaround. ifeq ($(SPEC),)
ifeq ($(JOBS),) # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
JOBS=$(NUM_CORES)
endif
ifneq ($(words $(SPEC)),1)
### We have multiple configurations to build, call make repeatedly
all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean:
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@ $(MAKE_ARGS)) &&) true
.PHONY: all jdk hotspot jaxws jaxp corba langtools install images clean dist-clean
else else
### This is the main part of the Makefile, for the normal case with SPEC specifying a single existing spec.gmk file. ifeq ($(words $(SPEC)),1)
# We are building a single configuration. This is the normal case. Execute the Main.gmk file.
# Now load the spec include $(dir $(makefile_path))/Main.gmk
include $(SPEC)
# Load the vital tools for all the makefiles.
include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
### Clean up from previous run
# Remove any build.log from a previous run, if they exist
ifneq (,$(BUILD_LOG))
ifneq (,$(BUILD_LOG_PREVIOUS))
# Rotate old log
$(shell $(RM) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
$(shell $(MV) $(BUILD_LOG) $(BUILD_LOG_PREVIOUS) 2> /dev/null)
else else
$(shell $(RM) $(BUILD_LOG) 2> /dev/null) # We are building multiple configurations.
# First, find out the valid targets
# Run the makefile with an arbitraty SPEC using -p -q (quiet dry-run and dump rules) to find
# available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
all_phony_targets=$(filter-out $(global_targets), $(strip $(shell \
$(MAKE) -p -q -f $(makefile_path) SPEC=$(firstword $(SPEC)) | \
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
$(all_phony_targets):
@$(foreach spec,$(SPEC),($(MAKE) -f $(makefile_path) SPEC=$(spec) $(VERBOSE) VERBOSE=$(VERBOSE) $@) &&) true
endif endif
endif endif
# Remove any javac server logs and port files. This
# prevents a new make run to reuse the previous servers.
ifneq (,$(JAVAC_SERVERS))
$(shell mkdir -p $(JAVAC_SERVERS) && rm -rf $(JAVAC_SERVERS)/*)
endif
# Clean out any notifications from the previous build.
$(shell find $(OUTPUT_ROOT) -name "_the.*.notify" $(FIND_DELETE))
# Reset the build timers.
$(eval $(call ResetTimers))
### Main targets
all: jdk
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
@$(call AtRootMakeEnd)
langtools: start-make langtools-only
langtools-only:
@$(call MakeStart,langtools,all)
@($(CD) $(LANGTOOLS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,langtools,all)
corba: langtools corba-only
corba-only:
@$(call MakeStart,corba,all)
@($(CD) $(CORBA_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,corba,all)
jaxp: langtools jaxp-only
jaxp-only:
@$(call MakeStart,jaxp,all)
@($(CD) $(JAXP_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,jaxp,all)
jaxws: langtools jaxp jaxws-only
jaxws-only:
@$(call MakeStart,jaxws,all)
@($(CD) $(JAXWS_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,jaxws,all)
hotspot: langtools hotspot-only
hotspot-only:
@$(call MakeStart,hotspot,all)
@($(CD) $(HOTSPOT_TOPDIR)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 $(HOTSPOT_MAKE_ARGS) $(MAKE_ARGS))
@$(call MakeFinish,hotspot,all)
jdk: langtools corba jaxp jaxws hotspot jdk-only
jdk-only:
@$(call MakeStart,jdk,all)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(MAKE_ARGS))
@$(call MakeFinish,jdk,all)
images: source-tips start-make jdk langtools corba jaxp jaxws hotspot images-only
images-only:
@$(call MakeStart,jdk-images,$@)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) images)
@$(call MakeFinish,jdk-images,$@)
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
@$(call AtRootMakeEnd)
install: source-tips start-make jdk langtools corba jaxp jaxws hotspot install-only
install-only:
@$(call MakeStart,jdk-images,$@)
@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) -j$(JOBS) $(JDK_MAKE_ARGS) $(MAKE_ARGS) install)
@$(call MakeFinish,jdk-images,$@)
@$(if $(JAVAC_SERVERS),rm -rf $(JAVAC_SERVERS)/*.port)
@$(call AtRootMakeEnd)
start-make:
@$(call AtRootMakeStart)
.PHONY: jdk hotspot jaxws jaxp corba langtools install images start-make
test: start-make
@$(call MakeStart,test,$(if $(TEST),$(TEST),all))
@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) MAKEFLAGS= -j1 PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
@$(call MakeFinish,test,$(if $(TEST),$(TEST),all))
@$(call AtRootMakeEnd)
.PHONY: test
# Stores the tips for each repository. This file is be used when constructing the jdk image and can be
# used to track the exact sources used to build that image.
source-tips: $(OUTPUT_ROOT)/source_tips
$(OUTPUT_ROOT)/source_tips: FRC
@$(MKDIR) -p $(@D)
@$(RM) $@
@$(call GetSourceTips)
# Remove everything, except the output from configure.
clean:
@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | grep -v "localdevenv.*" | grep -v uncygdrive.exe`)
@$(ECHO) Cleaned everything except the build configuration.
.PHONY: clean
# Remove everything, you have to rerun configure.
dist-clean:
@$(RM) -r $(OUTPUT_ROOT)
@$(ECHO) Cleaned everything, you will have to re-run configure.
.PHONY: dist-clean
clean-jdk:
@(cd $(OUTPUT_ROOT) && $(RM) -r `$(LS) $(OUTPUT_ROOT) | grep -v spec.gmk | grep -v spec.sh | grep -v Makefile | grep -v config.status | grep -v config.log | grep -v config.h | grep -v configure-arguments | \
grep -v langtools | grep -v corba | grep -v jaxp | grep -v jaxws | grep -v hotspot`)
@$(ECHO) "Cleaned jdk build artifacts (but not langtools,corba,jaxp,jaxws,hotspot nor the build configuration)"
.PHONY: clean
endif
# Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration.
# If you addd more global targets, please update the fatal-error macro. # If you addd more global targets, please update the variable global_targets in MakeHelpers.
help: help:
$(info ) $(info )
@@ -195,24 +87,45 @@ help:
$(info =====================) $(info =====================)
$(info ) $(info )
$(info Common make targets) $(info Common make targets)
$(info . make [all] # Compile all code but do not create images) $(info . make [all] # Compile all code but do not create images)
$(info . make images # Create complete j2sdk and j2re images) $(info . make images # Create complete j2sdk and j2re images)
$(info . make install # Install the generated images locally) $(info . make overlay-images # Create limited images for sparc 64 bit platforms)
$(info . make clean # Remove all files generated by make, but not those generated by configure) $(info . make bootcycle-images # Build images twice, second time with newly build JDK)
$(info . make dist-clean # Remove all files generated by both make and configure) $(info . make install # Install the generated images locally)
$(info . make help # Give some help on using make) $(info . make clean # Remove all files generated by make, but not those)
$(info . make test # Run tests, default is all tests (see TEST below)) $(info . # generated by configure)
$(info . make dist-clean # Remove all files, including configuration)
$(info . make help # Give some help on using make)
$(info . make test # Run tests, default is all tests (see TEST below))
$(info )
$(info Targets for specific components)
$(info (Component is any of langtools, corba, jaxp, jaxws, hotspot, jdk, images or overlay-images))
$(info . make <component> # Build <component> and everything it depends on. )
$(info . make <component>-only # Build <component> only, without dependencies. This)
$(info . # is faster but can result in incorrect build results!)
$(info . make clean-<component> # Remove files generated by make for <component>)
$(info ) $(info )
$(info Useful make variables) $(info Useful make variables)
$(info . make CONF= # Build all configurations (note, assignment is empty)) $(info . make CONF= # Build all configurations (note, assignment is empty))
$(info . make CONF=<substring> # Build the configuration(s) with a name matching the given substring) $(info . make CONF=<substring> # Build the configuration(s) with a name matching)
$(info . # <substring>)
$(info ) $(info )
$(info . make LOG=<loglevel> # Change loglevel from warn (default) to the given loglevel) $(info . make LOG=<loglevel> # Change the log level from warn to <loglevel>)
$(info . # Available loglevels are: warn, info, debug and trace) $(info . # Available log levels are:)
$(info . # To see executed command lines, use LOG=info) $(info . # 'warn' (default), 'info', 'debug' and 'trace')
$(info . # To see executed command lines, use LOG=debug)
$(info ) $(info )
$(info . make test TEST=<test> # Only run the given test or tests, e.g.) $(info . make JOBS=<n> # Run <n> parallel make jobs)
$(info . # make test TEST="jdk_lang jdk_net") $(info . # Note that -jN does not work as expected!)
$(info ) $(info )
.PHONY: help $(info . make test TEST=<test> # Only run the given test or tests, e.g.)
FRC: # Force target $(info . # make test TEST="jdk_lang jdk_net")
$(info )
configure:
@$(SHELL) $(root_dir)/configure $(CONFIGURE_ARGS)
@echo ====================================================
@echo "Note: This is a non-recommended way of running configure."
@echo "Instead, run 'sh configure' in the top-level directory"
.PHONY: help configure

View File

@@ -32,10 +32,10 @@ ifeq (,$(_MAKEBASE_GMK))
endif endif
ifeq ($(COMPILER_TYPE),CC) ifeq ($(COMPILER_TYPE),CC)
COMPILING_MSG=echo Compiling $1 COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
LINKING_MSG=echo Linking $1 LINKING_MSG=echo $(LOG_INFO) "Linking $1"
LINKING_EXE_MSG=echo Linking executable $1 LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
ARCHIVING_MSG=echo Archiving $1 ARCHIVING_MSG=echo $(LOG_INFO) "Archiving $1"
else else
COMPILING_MSG= COMPILING_MSG=
LINKING_MSG= LINKING_MSG=
@@ -55,22 +55,22 @@ define add_native_source
ifneq (,$$(filter %.c,$2)) ifneq (,$$(filter %.c,$2))
# Compile as a C file # Compile as a C file
$1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -c $1_$2_FLAGS=$4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
$1_$2_COMP=$5 $1_$2_COMP=$5
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS) $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
else ifneq (,$$(filter %.m,$2)) else ifneq (,$$(filter %.m,$2))
# Compile as a objective-c file # Compile as a objective-c file
$1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -c $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
$1_$2_COMP=$5 $1_$2_COMP=$5
$1_$2_DEP_FLAG:=$(C_FLAG_DEPS) $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
else ifneq (,$$(filter %.s,$2)) else ifneq (,$$(filter %.s,$2))
# Compile as assembler file # Compile as assembler file
$1_$2_FLAGS=$8 $1_$2_FLAGS=$8 -DTHIS_FILE='"$$(<F)"'
$1_$2_COMP=$(AS) $1_$2_COMP=$(AS)
$1_$2_DEP_FLAG:= $1_$2_DEP_FLAG:=
else else
# Compile as a C++ file # Compile as a C++ file
$1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -c $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
$1_$2_COMP=$7 $1_$2_COMP=$7
$1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS) $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
endif endif
@@ -94,11 +94,10 @@ define add_native_source
$$($1_$2_OBJ) : $2 $$($1_$2_OBJ) : $2
ifeq ($(COMPILER_TYPE),CC) ifeq ($(COMPILER_TYPE),CC)
$$(call COMPILING_MSG,$$(notdir $2)) $$(call COMPILING_MSG,$2,$$($1_TARGET))
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
endif endif
ifeq ($(COMPILER_TYPE),CL) ifeq ($(COMPILER_TYPE),CL)
$$(call COMPILING_MSG,$$(notdir $2))
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
endif endif
endif endif
@@ -129,27 +128,10 @@ define SetupNativeCompilation
# DEBUG_SYMBOLS add debug symbols (if configured on) # DEBUG_SYMBOLS add debug symbols (if configured on)
# CC the compiler to use, default is $(CC) # CC the compiler to use, default is $(CC)
# LDEXE the linker to use for linking executables, default is $(LDEXE) # LDEXE the linker to use for linking executables, default is $(LDEXE)
$(if $2,$1_$(strip $2)) # OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
$(if $3,$1_$(strip $3)) $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
$(if $4,$1_$(strip $4)) $(call LogSetupMacroEntry,SetupNativeCompilation($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))
$(if $5,$1_$(strip $5)) $(if $(26),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
$(if $6,$1_$(strip $6))
$(if $7,$1_$(strip $7))
$(if $8,$1_$(strip $8))
$(if $9,$1_$(strip $9))
$(if $(10),$1_$(strip $(10)))
$(if $(11),$1_$(strip $(11)))
$(if $(12),$1_$(strip $(12)))
$(if $(13),$1_$(strip $(13)))
$(if $(14),$1_$(strip $(14)))
$(if $(15),$1_$(strip $(15)))
$(if $(16),$1_$(strip $(16)))
$(if $(17),$1_$(strip $(17)))
$(if $(18),$1_$(strip $(18)))
$(if $(19),$1_$(strip $(19)))
$(if $(20),$1_$(strip $(20)))
$(if $(21),$1_$(strip $(21)))
$(if $(22),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
ifneq (,$$($1_BIN)) ifneq (,$$($1_BIN))
$$(error BIN has been replaced with OBJECT_DIR) $$(error BIN has been replaced with OBJECT_DIR)
@@ -232,9 +214,9 @@ define SetupNativeCompilation
$$(error You have to specify LANG for native compilation $1) $$(error You have to specify LANG for native compilation $1)
endif endif
ifeq (C,$$($1_LANG)) ifeq (C,$$($1_LANG))
ifeq ($$($1_LDEXE),) ifeq ($$($1_LDEXE),)
$1_LDEXE:=$(LDEXE) $1_LDEXE:=$(LDEXE)
endif endif
$1_LD:=$(LD) $1_LD:=$(LD)
else else
ifeq (C++,$$($1_LANG)) ifeq (C++,$$($1_LANG))
@@ -250,9 +232,11 @@ define SetupNativeCompilation
endif endif
# Make sure the dirs exist. # Make sure the dirs exist.
$$(shell $(MKDIR) -p $$($1_SRC) $$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)) $$(eval $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)))
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
# Find all files in the source trees. Sort to remove duplicates. # Find all files in the source trees. Sort to remove duplicates.
$1_ALL_SRCS := $$(sort $$(foreach i,$$($1_SRC), $$(shell $(FIND) $$i -type f))) $1_ALL_SRCS := $$(sort $$(shell $(FIND) $$($1_SRC) -type f))
# Extract the C/C++ files. # Extract the C/C++ files.
$1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES))) $1_EXCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_EXCLUDE_FILES)))
$1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES))) $1_INCLUDE_FILES:=$$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$($1_INCLUDE_FILES)))
@@ -287,7 +271,9 @@ define SetupNativeCompilation
# Are there too many object files on disk? Perhaps because some source file was removed? # Are there too many object files on disk? Perhaps because some source file was removed?
$1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS))) $1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
# Clean out the superfluous object files. # Clean out the superfluous object files.
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS)) ifneq ($$($1_SUPERFLUOUS_OBJS),)
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
endif
# Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS. # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
$1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
@@ -315,6 +301,17 @@ define SetupNativeCompilation
$1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release) $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
endif endif
ifneq (,$$($1_DEBUG_SYMBOLS))
ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
# Programs don't get the debug symbols added in the old build. It's not clear if
# this is intentional.
ifeq ($$($1_PROGRAM),)
$1_EXTRA_CFLAGS+=$(CFLAGS_DEBUG_SYMBOLS)
$1_EXTRA_CXXFLAGS+=$(CXXFLAGS_DEBUG_SYMBOLS)
endif
endif
endif
ifeq ($$($1_CXXFLAGS),) ifeq ($$($1_CXXFLAGS),)
$1_CXXFLAGS:=$$($1_CFLAGS) $1_CXXFLAGS:=$$($1_CFLAGS)
endif endif
@@ -327,47 +324,22 @@ define SetupNativeCompilation
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER) $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
endif endif
ifneq (no, $(ENABLE_DEBUG_SYMBOLS))
ifneq ($(OPENJDK_TARGET_OS), solaris)
# <weird code />
# There is very weird code in Defs-solaris.gmk that first sets variables as decribed below
# and then a couple of hundreds of line below resets them...
# this feels like a sure bug...but before this is confirmed, mimic this behaviour
# (note: skip indenting this as it will surely be removed anyway)
# <weird code />
ifneq (,$$($1_DEBUG_SYMBOLS))
$1_OPTIMIZATION := LOW
$1_EXTRA_CFLAGS += $(CFLAGS_DEBUG_SYMBOLS)
$1_EXTRA_CXXFLAGS += $(CXXFLAGS_DEBUG_SYMBOLS)
endif
# <weird code />
endif
# <weird code />
endif
ifeq (NONE, $$($1_OPTIMIZATION)) ifeq (NONE, $$($1_OPTIMIZATION))
$1_EXTRA_CFLAGS += $$(C_O_FLAG_NONE) $1_EXTRA_CFLAGS += $(C_O_FLAG_NONE)
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NONE) $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE)
else ifeq (LOW, $$($1_OPTIMIZATION)) else ifeq (LOW, $$($1_OPTIMIZATION))
$1_EXTRA_CFLAGS += $$(C_O_FLAG_NORM) $1_EXTRA_CFLAGS += $(C_O_FLAG_NORM)
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_NORM) $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NORM)
else ifeq (HIGH, $$($1_OPTIMIZATION)) else ifeq (HIGH, $$($1_OPTIMIZATION))
$1_EXTRA_CFLAGS += $$(C_O_FLAG_HI) $1_EXTRA_CFLAGS += $(C_O_FLAG_HI)
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HI) $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HI)
else ifeq (HIGHEST, $$($1_OPTIMIZATION)) else ifeq (HIGHEST, $$($1_OPTIMIZATION))
$1_EXTRA_CFLAGS += $$(C_O_FLAG_HIGHEST) $1_EXTRA_CFLAGS += $(C_O_FLAG_HIGHEST)
$1_EXTRA_CXXFLAGS += $$(CXX_O_FLAG_HIGHEST) $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_HIGHEST)
else ifneq (, $$($1_OPTIMIZATION)) else ifneq (, $$($1_OPTIMIZATION))
$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION)) $$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
endif endif
# Now create a list of the packages that are about to compile. Used when sending source
# in a batch to the compiler.
$$(shell $(RM) $$($1_OBJECT_DIR)/_the.list_of_sources)
$$(eval $$(call ListPathsSafelyNow,$1_SRCS,\n, >> $$($1_OBJECT_DIR)/_the.list_of_sources))
# Now call add_native_source for each source file we are going to compile. # Now call add_native_source for each source file we are going to compile.
$$(foreach p,$$($1_SRCS),\ $$(foreach p,$$($1_SRCS),\
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\ $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\
@@ -375,7 +347,7 @@ define SetupNativeCompilation
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS)))) $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
# On windows we need to create a resource file # On windows we need to create a resource file
ifeq ($(OPENJDK_TARGET_OS_API), winapi) ifeq ($(OPENJDK_TARGET_OS), windows)
ifneq (,$$($1_VERSIONINFO_RESOURCE)) ifneq (,$$($1_VERSIONINFO_RESOURCE))
$1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
$$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES): $$($1_VERSIONINFO_RESOURCE)
@@ -390,8 +362,6 @@ define SetupNativeCompilation
endif endif
# mapfile doesnt seem to be implemented on macosx (yet??) # mapfile doesnt seem to be implemented on macosx (yet??)
ifneq ($(OPENJDK_TARGET_CPU),ppc)
ifneq ($(OPENJDK_TARGET_CPU),arm)
ifneq ($(OPENJDK_TARGET_OS),macosx) ifneq ($(OPENJDK_TARGET_OS),macosx)
ifneq ($(OPENJDK_TARGET_OS),windows) ifneq ($(OPENJDK_TARGET_OS),windows)
$1_REAL_MAPFILE:=$$($1_MAPFILE) $1_REAL_MAPFILE:=$$($1_MAPFILE)
@@ -406,11 +376,9 @@ define SetupNativeCompilation
endif endif
endif endif
endif endif
endif
endif
# Pickup extra OPENJDK_TARGET_OS_API dependent variables (posix or winapi) and # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
# (linux,solaris,windows,bsd) for LDFLAGS and LDFLAGS_SUFFIX # for LDFLAGS and LDFLAGS_SUFFIX
$1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS)) $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
$1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS)) $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
ifneq (,$$($1_REAL_MAPFILE)) ifneq (,$$($1_REAL_MAPFILE))
@@ -432,9 +400,10 @@ define SetupNativeCompilation
"-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map" "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
endif endif
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/% ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
$(CP) $$< $$@ $(CP) $$< $$@
endif
ifeq ($(OPENJDK_TARGET_OS), solaris) ifeq ($(OPENJDK_TARGET_OS), solaris)
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
@@ -449,9 +418,9 @@ define SetupNativeCompilation
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \ $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
$(RM) $$@ $(RM) $$@
$(FIX_EMPTY_SEC_HDR_FLAGS) $$< $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
$(OBJCOPY) --only-keep-debug $$< $$@ $(OBJCOPY) --only-keep-debug $$< $$@
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$< $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
else # not solaris else # not solaris
$$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
$(RM) $$@ $(RM) $$@
@@ -509,8 +478,10 @@ define SetupNativeCompilation
"-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map" "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
endif endif
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/% ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
$$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/%
$(CP) $$< $$@ $(CP) $$< $$@
endif
ifeq ($(OPENJDK_TARGET_OS), solaris) ifeq ($(OPENJDK_TARGET_OS), solaris)
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
@@ -525,9 +496,9 @@ define SetupNativeCompilation
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \ $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
$(RM) $$@ $(RM) $$@
$(FIX_EMPTY_SEC_HDR_FLAGS) $$< $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
$(OBJCOPY) --only-keep-debug $$< $$@ $(OBJCOPY) --only-keep-debug $$< $$@
$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $$(@F) $$< $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
else # not solaris else # not solaris
$$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
$(RM) $$@ $(RM) $$@
@@ -566,7 +537,7 @@ define SetupNativeCompilation
$$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \ $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
$$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
ifneq (,$$($1_GEN_MANIFEST)) ifneq (,$$($1_GEN_MANIFEST))
$(MT) -nologo /manifest $$($1_GEN_MANIFEST) /outputresource:$$@;#1 $(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1
endif endif
endif endif

View File

@@ -34,16 +34,9 @@ define SetupRMICompilation
# RUN_IIOP:=Set to run rmic with -iiop # RUN_IIOP:=Set to run rmic with -iiop
# RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage # RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
# KEEP_GENERATED:=Set to keep generated sources around # KEEP_GENERATED:=Set to keep generated sources around
$(if $2,$1_$(strip $2)) $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
$(if $3,$1_$(strip $3)) $(call LogSetupMacroEntry,SetupRMICompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
$(if $4,$1_$(strip $4)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
$(if $5,$1_$(strip $5))
$(if $6,$1_$(strip $6))
$(if $7,$1_$(strip $7))
$(if $8,$1_$(strip $8))
$(if $9,$1_$(strip $9))
$(if $(10),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
$1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/$1_rmic
@@ -86,12 +79,12 @@ define SetupRMICompilation
$$($1_DEP_FILE): $$($1_CLASS_FILES) $$($1_DEP_FILE): $$($1_CLASS_FILES)
$(MKDIR) -p $$($1_STUB_CLASSES_DIR) $(MKDIR) -p $$($1_STUB_CLASSES_DIR)
if [ "x$$($1_ARGS)" != "x" ]; then \ if [ "x$$($1_ARGS)" != "x" ]; then \
$(ECHO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \ $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
fi; fi;
if [ "x$$($1_ARGS2)" != "x" ]; then \ if [ "x$$($1_ARGS2)" != "x" ]; then \
$(ECHO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \ $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\
fi; fi;

View File

@@ -22,21 +22,98 @@
# questions. # questions.
# #
include $(SPEC)
include MakeBase.gmk
.SUFFIXES: # Delete the default suffixes
.SUFFIXES: .java
# #
# Definitions for $(DOCSDIR), $(MKDIR), $(BINDIR), etc. # Definitions for $(DOCSDIR), $(MKDIR), $(BINDIR), etc.
# #
BUILDDIR=..
PRODUCT=docs
include $(BUILDDIR)/common/Defs.gmk
# Get CopyrightLine macro and other shared variables CLASSPATH_SEPARATOR = :
include $(BUILDDIR)/common/shared/Defs-javadoc.gmk
DOCSDIR=$(OUTPUT_ROOT)/docs
TEMPDIR=$(OUTPUT_ROOT)/docstemp
JDK_SHARE_SRC=$(JDK_TOPDIR)/src/share
JDK_SHARE_CLASSES=$(JDK_SHARE_SRC)/classes
JDK_IMPSRC = $(JDK_OUTPUTDIR)/impsrc
JDK_GENSRC = $(JDK_OUTPUTDIR)/gensrc
HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_OUTPUTDIR)/docs
BUILD_NUMBER=$(JDK_BUILD_NUMBER)
BOOT_JAVA_CMD=$(JAVA)
# Langtools
JAVAC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javac.jar
JAVADOC_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/javadoc.jar
DOCLETS_JAR = $(LANGTOOLS_DIST)/bootstrap/lib/doclets.jar
JAVADOC_CMD = $(BOOT_JAVA_CMD) \
-Xmx1024m \
-Djava.awt.headless=true \
"-Xbootclasspath/p:$(JAVADOC_JAR)$(CLASSPATH_SEPARATOR)$(JAVAC_JAR)$(CLASSPATH_SEPARATOR)$(DOCLETS_JAR)" \
-jar $(JAVADOC_JAR)
JAVADOC_CMD = javadoc
# Copyright year for beginning of Java and some of the apis
# (Needed when creating the javadocs)
FIRST_COPYRIGHT_YEAR = 1993
DOMAPI_FIRST_COPYRIGHT_YEAR = 2005
MIRROR_FIRST_COPYRIGHT_YEAR = 2004
DOCLETAPI_FIRST_COPYRIGHT_YEAR = 1993
TAGLETAPI_FIRST_COPYRIGHT_YEAR = 1993
JDI_FIRST_COPYRIGHT_YEAR = 1999
JAAS_FIRST_COPYRIGHT_YEAR = 1998
JGSS_FIRST_COPYRIGHT_YEAR = 2000
SMARTCARDIO_FIRST_COPYRIGHT_YEAR = 2005
HTTPSERVER_FIRST_COPYRIGHT_YEAR = 2005
MGMT_FIRST_COPYRIGHT_YEAR = 2003
ATTACH_FIRST_COPYRIGHT_YEAR = 2005
JCONSOLE_FIRST_COPYRIGHT_YEAR = 2006
SCTPAPI_FIRST_COPYRIGHT_YEAR = 2009
TRACING_FIRST_COPYRIGHT_YEAR = 2008
TREEAPI_FIRST_COPYRIGHT_YEAR = 2005
JNLP_FIRST_COPYRIGHT_YEAR = 1998
PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
# Oracle name
FULL_COMPANY_NAME = Oracle and/or its affiliates
# Copyright address
COMPANY_ADDRESS = 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA.
# The trademark symbol
TRADEMARK = &trade;
# Common copyright lines used
# The word "Copyright" might optionally be a link to the file cpyr.html.
# The first year of copyright may vary or not be available.
# The address to the company might be optional.
COMMA:= ,
EMPTY:=
SPACE:=$(EMPTY) $(EMPTY)
COPYRIGHT_SYMBOL = &\#x00a9;
# Macro to construct the copyright line
# (The GNU make 3.78.1 "if" conditional is broken, fixed in GNU make 3.81)
define CopyrightLine # optionalurl optionalfirstyear optionaladdress
$(if $(strip $1),<a href="$(strip $1)">Copyright</a>,Copyright) \
$(COPYRIGHT_SYMBOL) $(if $2,$2${COMMA},) $(COPYRIGHT_YEAR),\
$(FULL_COMPANY_NAME). $3 All rights reserved.
endef
# Url to root of documents # Url to root of documents
DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR) DOCSDIR_URL = {@docroot}/$(GET2DOCSDIR)
# Url to copyright html file # Url to copyright html file
COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html
COPYRIGHT_URL-8 = $(DOCSDIR_URL)/legal/cpyr.html
COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION)) COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION))
# Url to bug filing site # Url to bug filing site
@@ -47,46 +124,30 @@ BUG_SUBMIT_LINE = <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a>
# Url to devdocs page # Url to devdocs page
# Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html # Was: http://java.sun.com/javase/6/webnotes/devdocs-vs-specs.html
DEV_DOCS_URL-5 = http://java.sun.com/j2se/1.5.0/docs/index.html
DEV_DOCS_URL-6 = http://download.oracle.com/javase/6/docs/index.html
DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html DEV_DOCS_URL-7 = http://download.oracle.com/javase/7/docs/index.html
DEV_DOCS_URL-8 = http://download.oracle.com/javase/7/docs/index.html
DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION)) DEV_DOCS_URL = $(DEV_DOCS_URL-$(JDK_MINOR_VERSION))
DOCS_BASE_URL = http://download.oracle.com/javase/7/docs DOCS_BASE_URL = http://download.oracle.com/javase/7/docs
# Url to Java Language Spec
#JLS3_URL = http://java.sun.com/docs/books/jls/
# Common Java trademark line # Common Java trademark line
JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \ JAVA_TRADEMARK_LINE = Java is a trademark or registered trademark of \
$(FULL_COMPANY_NAME) in the US and other countries. $(FULL_COMPANY_NAME) in the US and other countries.
# #################################################################
# Definitions for imported components # Macros:
#
include $(BUILDDIR)/common/internal/ImportComponents.gmk
# We override whatever the max VM memory setting is here.
# NOTE: javadoc will not complete without these larger settings.
# WARNING: This could cause thrashing on low memory machines.
ifeq ($(ARCH_DATA_MODEL),64)
MAX_VM_MEMORY = 1024
else ifeq ($(ARCH),universal)
MAX_VM_MEMORY = 1024
else
MAX_VM_MEMORY = 612
endif
# List of all possible directories for javadoc to look for sources # List of all possible directories for javadoc to look for sources
# NOTE: Quotes are required around sourcepath argument only on Windows. # NOTE: Quotes are required around sourcepath argument only on Windows.
# Otherwise, you get "No packages or classes specified." due # Otherwise, you get "No packages or classes specified." due
# to $(CLASSPATH_SEPARATOR) being interpreted as an end of # to $(CLASSPATH_SEPARATOR) being interpreted as an end of
# command (newline or shell ; character) # command (newline or shell ; character)
ALL_SOURCE_DIRS = $(SHARE_SRC)/classes \ ALL_SOURCE_DIRS = $(JDK_IMPSRC) \
$(IMPORTSRCDIR) \ $(JDK_GENSRC) \
$(GENSRCDIR) \ $(JDK_SHARE_CLASSES) \
$(SHARE_SRC)/../solaris/classes \ $(JDK_TOPDIR)/src/solaris/classes \
$(SHARE_SRC)/../windows/classes \ $(JDK_TOPDIR)/src/windows/classes \
$(SHARE_SRC)/doc/stub $(JDK_SHARE_SRC)/doc/stub
# List of directories that actually exist # List of directories that actually exist
ALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS)) ALL_EXISTING_SOURCE_DIRS := $(wildcard $(ALL_SOURCE_DIRS))
@@ -97,6 +158,11 @@ SPACE:= $(EMPTY) $(EMPTY)
RELEASEDOCS_SOURCEPATH = \ RELEASEDOCS_SOURCEPATH = \
$(subst $(SPACE),$(CLASSPATH_SEPARATOR),$(strip $(ALL_SOURCE_DIRS))) $(subst $(SPACE),$(CLASSPATH_SEPARATOR),$(strip $(ALL_SOURCE_DIRS)))
define prep-target
$(MKDIR) -p $(@D)
$(RM) $@
endef
# Prep for javadoc creation, assumes $@ is an index.html file # Prep for javadoc creation, assumes $@ is an index.html file
define prep-javadoc define prep-javadoc
@if [ -f "$@" -a "$?" != "" ] ; then \ @if [ -f "$@" -a "$?" != "" ] ; then \
@@ -203,7 +269,7 @@ $(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\
# Common javadoc options used by all # Common javadoc options used by all
COMMON_JAVADOCFLAGS = \ COMMON_JAVADOCFLAGS = \
$(NO_PROPRIETARY_API_WARNINGS) \ -XDignore.symbol.file=true \
-quiet \ -quiet \
-use \ -use \
-keywords \ -keywords \
@@ -217,19 +283,8 @@ else
endif endif
# Draft used for non-fcs documents # Draft used for non-fcs documents
JDK_IS_FCS = false
DRAFT_HEADER = DRAFT_HEADER =
ifeq ($(JDK_MINOR_VERSION),5) ifneq ($(MILESTONE), fcs)
JDK_IS_FCS = true
endif
ifeq ($(JDK_MINOR_VERSION),6)
JDK_IS_FCS = true
endif
ifeq ($(JDK_MINOR_VERSION),7)
JDK_IS_FCS = true
endif
ifeq ($(JDK_IS_FCS),false)
ifneq ($(MILESTONE), fcs)
DRAFT_HEADER = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong> DRAFT_HEADER = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
DRAFT_BOTTOM = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong> DRAFT_BOTTOM = <br><strong>DRAFT&nbsp;$(MILESTONE)-$(BUILD_NUMBER)</strong>
DRAFT_WINTITLE = $(BUILD_NUMBER) DRAFT_WINTITLE = $(BUILD_NUMBER)
@@ -245,7 +300,6 @@ contained herein are not final and are subject to change. \
The information is being made available to you solely for purpose of \ The information is being made available to you solely for purpose of \
evaluation. \ evaluation. \
</div> </div> </div> </div>
endif
endif endif
################################################################# #################################################################
@@ -309,7 +363,7 @@ TAG_JLS = jls:a:See <cite> \
The Java&trade; Language Specification</cite>: The Java&trade; Language Specification</cite>:
# Overview file for core apis # Overview file for core apis
COREAPI_OVERVIEW = $(SHARE_SRC)/classes/overview-core.html COREAPI_OVERVIEW = $(JDK_SHARE_CLASSES)/overview-core.html
# The index.html, options, and packages files # The index.html, options, and packages files
COREAPI_INDEX_FILE = $(COREAPI_DOCSDIR)/index.html COREAPI_INDEX_FILE = $(COREAPI_DOCSDIR)/index.html
@@ -325,7 +379,7 @@ $(COREAPI_INDEX_FILE): GET2DOCSDIR=..
$(COREAPI_INDEX_FILE): $(COREAPI_OPTIONS_FILE) $(COREAPI_PACKAGES_FILE) $(COREAPI_INDEX_FILE): $(COREAPI_OPTIONS_FILE) $(COREAPI_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(COREAPI_OPTIONS_FILE),$(COREAPI_PACKAGES_FILE)) $(call JavadocSummary,$(COREAPI_OPTIONS_FILE),$(COREAPI_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE) @$(COREAPI_OPTIONS_FILE) @$(COREAPI_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -363,10 +417,7 @@ $(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_P
# docletapidocs # docletapidocs
# #
# Part of langtools ALL_OTHER_TARGETS += docletapidocs
ifdef LANGTOOLS_DIST
ALL_OTHER_TARGETS += docletapidocs
endif
DOCLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/doclet DOCLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/doclet
DOCLETAPI2COREAPI := ../../$(JDKJRE2COREAPI) DOCLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
@@ -392,7 +443,7 @@ $(DOCLETAPI_INDEX_FILE): GET2DOCSDIR=$(DOCLETAPI2COREAPI)/..
$(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE) $(DOCLETAPI_INDEX_FILE): $(DOCLETAPI_OPTIONS_FILE) $(DOCLETAPI_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE)) $(call JavadocSummary,$(DOCLETAPI_OPTIONS_FILE),$(DOCLETAPI_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE) @$(DOCLETAPI_OPTIONS_FILE) @$(DOCLETAPI_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -420,11 +471,7 @@ $(DOCLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(DOCL
# tagletapidocs # tagletapidocs
# #
# Part of langtools ALL_OTHER_TARGETS += tagletapidocs
ifdef LANGTOOLS_DIST
ALL_OTHER_TARGETS += tagletapidocs
endif
TAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/taglet TAGLETAPI_DOCDIR := $(JDK_API_DOCSDIR)/javadoc/taglet
TAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI) TAGLETAPI2COREAPI := ../../$(JDKJRE2COREAPI)
TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR)) TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_YEAR))
@@ -434,7 +481,7 @@ TAGLETAPI_BOTTOM := $(call CommonTrademarkBottom,$(TAGLETAPI_FIRST_COPYRIGHT_Y
TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp TAGLETAPI_TEMPDIR = $(DOCSTMPDIR)/taglets_temp
# The index.html, options, and packages files # The index.html, options, and packages files
TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/index.html TAGLETAPI_INDEX_FILE = $(TAGLETAPI_DOCDIR)/com/sun/tools/doclets/Taglet.html
TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options TAGLETAPI_OPTIONS_FILE = $(DOCSTMPDIR)/tagletapi.options
TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages TAGLETAPI_PACKAGES_FILE = $(DOCSTMPDIR)/tagletapi.packages
@@ -449,7 +496,7 @@ $(TAGLETAPI_INDEX_FILE): $(TAGLETAPI_OPTIONS_FILE) $(TAGLETAPI_PACKAGES_FILE)
$(RM) -r $(TAGLETAPI_TEMPDIR) $(RM) -r $(TAGLETAPI_TEMPDIR)
$(MKDIR) -p $(TAGLETAPI_TEMPDIR) $(MKDIR) -p $(TAGLETAPI_TEMPDIR)
$(call JavadocSummary,$(TAGLETAPI_OPTIONS_FILE),$(TAGLETAPI_PACKAGES_FILE)) $(call JavadocSummary,$(TAGLETAPI_OPTIONS_FILE),$(TAGLETAPI_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(TAGLETAPI_TEMPDIR) \ $(JAVADOC_CMD) -d $(TAGLETAPI_TEMPDIR) \
@$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE) @$(TAGLETAPI_OPTIONS_FILE) @$(TAGLETAPI_PACKAGES_FILE)
cp -r $(TAGLETAPI_TEMPDIR)/com $(@D) cp -r $(TAGLETAPI_TEMPDIR)/com $(@D)
cp $(TAGLETAPI_TEMPDIR)/stylesheet.css $(@D) cp $(TAGLETAPI_TEMPDIR)/stylesheet.css $(@D)
@@ -462,15 +509,17 @@ $(TAGLETAPI_OPTIONS_FILE):
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-nonavbar) ; \ $(call OptionOnly,-nonavbar) ; \
$(call OptionOnly,-noindex) ; \ $(call OptionOnly,-noindex) ; \
$(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionPair,-bottom,$(TAGLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-linkoffline,$(TAGLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ $(call OptionTrip,-linkoffline,$(TAGLETAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
) >> $@ ) >> $@
# Create a file with the package names in it # Create a file with the package names in it
$(TAGLETAPI_PACKAGES_FILE): $(IMPORTSRCDIR)/$(TAGLETAPI_FILE) $(TAGLETAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(TAGLETAPI_PKGS))
$(prep-target) $(prep-target)
@($(ECHO) "$(IMPORTSRCDIR)/$(TAGLETAPI_FILE)" ) > $@ $(call PackageFilter,$(TAGLETAPI_PKGS))
$(GREP) "$(TAGLETAPI_FILE)" $@ > $@.tmp
$(MV) $@.tmp $@
############################################################# #############################################################
# #
@@ -503,7 +552,7 @@ $(DOMAPI_INDEX_FILE): GET2DOCSDIR=$(DOMAPI2COREAPI)/..
$(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE) $(DOMAPI_INDEX_FILE): $(DOMAPI_OPTIONS_FILE) $(DOMAPI_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE)) $(call JavadocSummary,$(DOMAPI_OPTIONS_FILE),$(DOMAPI_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE) @$(DOMAPI_OPTIONS_FILE) @$(DOMAPI_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -548,7 +597,7 @@ JDI_DOCTITLE := Java$(TRADEMARK) Debug Interface
JDI_WINDOWTITLE := Java Debug Interface JDI_WINDOWTITLE := Java Debug Interface
JDI_HEADER := <strong>Java Debug Interface</strong> JDI_HEADER := <strong>Java Debug Interface</strong>
JDI_BOTTOM := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR)) JDI_BOTTOM := $(call CommonBottom,$(JDI_FIRST_COPYRIGHT_YEAR))
JDI_OVERVIEW := $(SHARE_SRC)/classes/jdi-overview.html JDI_OVERVIEW := $(JDK_SHARE_CLASSES)/jdi-overview.html
# JDI_PKGS is located in NON_CORE_PKGS.gmk # JDI_PKGS is located in NON_CORE_PKGS.gmk
# The index.html, options, and packages files # The index.html, options, and packages files
@@ -565,7 +614,7 @@ $(JDI_INDEX_FILE): GET2DOCSDIR=$(JDI2COREAPI)/..
$(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE) $(JDI_INDEX_FILE): $(JDI_OPTIONS_FILE) $(JDI_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE)) $(call JavadocSummary,$(JDI_OPTIONS_FILE),$(JDI_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE) @$(JDI_OPTIONS_FILE) @$(JDI_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -595,12 +644,12 @@ $(JDI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JDI_PKGS))
ALL_OTHER_TARGETS += jdwpdocs ALL_OTHER_TARGETS += jdwpdocs
JDWP_DOCDIR = $(PLATFORM_DOCSDIR)/jpda/jdwp JDWP_DOCDIR = $(PLATFORM_DOCSDIR)/jpda/jdwp
JDWP_SPEC = $(BUILDDIR)/jpda/jdwp/jdwp.spec
jdwpdocs: $(JDWP_DOCDIR)/jdwp-protocol.html jdwpdocs: $(JDWP_DOCDIR)/jdwp-protocol.html
$(JDWP_DOCDIR)/jdwp-protocol.html: $(BUILD_TOOLS) $(JDWP_SPEC) $(JDWP_DOCDIR)/jdwp-protocol.html : $(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
$(prep-javadoc) $(MKDIR) -p $(@D)
$(TOOL_JDWPGEN) $(JDWP_SPEC) -doc $@ $(RM) $@
$(CP) $< $@
############################################################# #############################################################
# #
@@ -610,7 +659,7 @@ $(JDWP_DOCDIR)/jdwp-protocol.html: $(BUILD_TOOLS) $(JDWP_SPEC)
ALL_OTHER_TARGETS += jvmtidocs ALL_OTHER_TARGETS += jvmtidocs
JVMTI_DOCDIR = $(PLATFORM_DOCSDIR)/jvmti JVMTI_DOCDIR = $(PLATFORM_DOCSDIR)/jvmti
JVMTI_HTML = $(HOTSPOT_DOCS_IMPORT_PATH)/platform/jvmti/jvmti.html JVMTI_HTML = $(HOTSPOT_DIST)/docs/platform/jvmti/jvmti.html
jvmtidocs: $(JVMTI_DOCDIR)/jvmti.html jvmtidocs: $(JVMTI_DOCDIR)/jvmti.html
$(JVMTI_DOCDIR)/jvmti.html: $(JVMTI_DOCDIR)/jvmti.html:
@@ -636,7 +685,7 @@ JAAS_WINDOWTITLE := Java Authentication and Authorization Service
JAAS_HEADER := <strong>Java Authentication and Authorization Service</strong> JAAS_HEADER := <strong>Java Authentication and Authorization Service</strong>
JAAS_BOTTOM := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR)) JAAS_BOTTOM := $(call CommonBottom,$(JAAS_FIRST_COPYRIGHT_YEAR))
# JAAS_PKGS is located in NON_CORE_PKGS.gmk # JAAS_PKGS is located in NON_CORE_PKGS.gmk
JAAS_OVERVIEW := $(SHARE_SRC)/classes/com/sun/security/auth/jaas-overview.html JAAS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/auth/jaas-overview.html
# The index.html, options, and packages files # The index.html, options, and packages files
JAAS_INDEX_FILE = $(JAAS_DOCDIR)/index.html JAAS_INDEX_FILE = $(JAAS_DOCDIR)/index.html
@@ -652,7 +701,7 @@ $(JAAS_INDEX_FILE): GET2DOCSDIR=$(JAAS2COREAPI)/..
$(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE) $(JAAS_INDEX_FILE): $(JAAS_OPTIONS_FILE) $(JAAS_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE)) $(call JavadocSummary,$(JAAS_OPTIONS_FILE),$(JAAS_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE) @$(JAAS_OPTIONS_FILE) @$(JAAS_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -687,7 +736,7 @@ JGSS_DOCTITLE := Java$(TRADEMARK) GSS-API Utilities
JGSS_WINDOWTITLE := Java GSS-API Utilities JGSS_WINDOWTITLE := Java GSS-API Utilities
JGSS_HEADER := <strong>Java GSS-API Utilities</strong> JGSS_HEADER := <strong>Java GSS-API Utilities</strong>
JGSS_BOTTOM := $(call CommonBottom,$(JGSS_FIRST_COPYRIGHT_YEAR)) JGSS_BOTTOM := $(call CommonBottom,$(JGSS_FIRST_COPYRIGHT_YEAR))
JGSS_OVERVIEW := $(SHARE_SRC)/classes/com/sun/security/jgss/jgss-overview.html JGSS_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/security/jgss/jgss-overview.html
# JGSS_PKGS is located in NON_CORE_PKGS.gmk # JGSS_PKGS is located in NON_CORE_PKGS.gmk
# The index.html, options, and packages files # The index.html, options, and packages files
@@ -704,7 +753,7 @@ $(JGSS_INDEX_FILE): GET2DOCSDIR=$(JGSS2COREAPI)/..
$(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE) $(JGSS_INDEX_FILE): $(JGSS_OPTIONS_FILE) $(JGSS_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE)) $(call JavadocSummary,$(JGSS_OPTIONS_FILE),$(JGSS_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE) @$(JGSS_OPTIONS_FILE) @$(JGSS_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -756,7 +805,7 @@ $(SMARTCARDIO_INDEX_FILE): GET2DOCSDIR=$(SMARTCARDIO2COREAPI)/..
$(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE) $(SMARTCARDIO_INDEX_FILE): $(SMARTCARDIO_OPTIONS_FILE) $(SMARTCARDIO_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE)) $(call JavadocSummary,$(SMARTCARDIO_OPTIONS_FILE),$(SMARTCARDIO_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE) @$(SMARTCARDIO_OPTIONS_FILE) @$(SMARTCARDIO_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -806,7 +855,7 @@ $(HTTPSERVER_INDEX_HTML): GET2DOCSDIR=$(HTTPSERVER2COREAPI)/..
$(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE) $(HTTPSERVER_INDEX_HTML): $(HTTPSERVER_OPTIONS_FILE) $(HTTPSERVER_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE)) $(call JavadocSummary,$(HTTPSERVER_OPTIONS_FILE),$(HTTPSERVER_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE) @$(HTTPSERVER_OPTIONS_FILE) @$(HTTPSERVER_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -843,7 +892,7 @@ MGMT_DOCTITLE := Monitoring and Management Interface for the Java$(TRADEMARK)
MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform MGMT_WINDOWTITLE := Monitoring and Management Interface for the Java Platform
MGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong> MGMT_HEADER := <strong>Monitoring and Management Interface for the Java Platform</strong>
MGMT_BOTTOM := $(call CommonBottom,$(MGMT_FIRST_COPYRIGHT_YEAR)) MGMT_BOTTOM := $(call CommonBottom,$(MGMT_FIRST_COPYRIGHT_YEAR))
MGMT_OVERVIEW := $(SHARE_SRC)/classes/com/sun/management/mgmt-overview.html MGMT_OVERVIEW := $(JDK_SHARE_CLASSES)/com/sun/management/mgmt-overview.html
# MGMT_PKGS is located in NON_CORE_PKGS.gmk # MGMT_PKGS is located in NON_CORE_PKGS.gmk
# The index.html, options, and packages files # The index.html, options, and packages files
@@ -866,7 +915,7 @@ $(MGMT_INDEX_FILE): $(MGMT_OPTIONS_FILE) $(MGMT_PACKAGES_FILE)
$(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; \ $(ECHO) "WARNING: File $(JVM_MIB_NAME) not available."; \
fi fi
$(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE)) $(call JavadocSummary,$(MGMT_OPTIONS_FILE),$(MGMT_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE) @$(MGMT_OPTIONS_FILE) @$(MGMT_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -917,7 +966,7 @@ $(ATTACH_INDEX_HTML): GET2DOCSDIR=$(ATTACH2COREAPI)/..
$(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE) $(ATTACH_INDEX_HTML): $(ATTACH_OPTIONS_FILE) $(ATTACH_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE)) $(call JavadocSummary,$(ATTACH_OPTIONS_FILE),$(ATTACH_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE) @$(ATTACH_OPTIONS_FILE) @$(ATTACH_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -967,7 +1016,7 @@ $(JCONSOLE_INDEX_HTML): GET2DOCSDIR=$(JCONSOLE2COREAPI)/..
$(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE) $(JCONSOLE_INDEX_HTML): $(JCONSOLE_OPTIONS_FILE) $(JCONSOLE_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE)) $(call JavadocSummary,$(JCONSOLE_OPTIONS_FILE),$(JCONSOLE_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE) @$(JCONSOLE_OPTIONS_FILE) @$(JCONSOLE_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -994,10 +1043,7 @@ $(JCONSOLE_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JCONS
# treeapidocs # treeapidocs
# #
# Part of langtools ALL_OTHER_TARGETS += treeapidocs
ifdef LANGTOOLS_DIST
ALL_OTHER_TARGETS += treeapidocs
endif
TREEAPI_DOCDIR := $(JDK_API_DOCSDIR)/javac/tree TREEAPI_DOCDIR := $(JDK_API_DOCSDIR)/javac/tree
TREEAPI2COREAPI := ../../$(JDKJRE2COREAPI) TREEAPI2COREAPI := ../../$(JDKJRE2COREAPI)
@@ -1022,7 +1068,7 @@ $(TREEAPI_INDEX_HTML): GET2DOCSDIR=$(TREEAPI2COREAPI)/..
$(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE) $(TREEAPI_INDEX_HTML): $(TREEAPI_OPTIONS_FILE) $(TREEAPI_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE)) $(call JavadocSummary,$(TREEAPI_OPTIONS_FILE),$(TREEAPI_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE) @$(TREEAPI_OPTIONS_FILE) @$(TREEAPI_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -1067,13 +1113,13 @@ SCTPAPI_PACKAGES_FILE = $(DOCSTMPDIR)/sctp.packages
sctpdocs: $(SCTPAPI_INDEX_HTML) sctpdocs: $(SCTPAPI_INDEX_HTML)
# Set relative location to core api document root # Set relative location to core api document root
$(SCTSCTSCTP: GET2DOCSDIR=$(SCTPAPI2COREAPI)/.. $(SCTPAPI_INDEX_HTML): GET2DOCSDIR=$(SCTPAPI2COREAPI)/..
# Run javadoc if the index file is out of date or missing # Run javadoc if the index file is out of date or missing
$(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE) $(SCTPAPI_INDEX_HTML): $(SCTPAPI_OPTIONS_FILE) $(SCTPAPI_PACKAGES_FILE)
$(prep-javadoc) $(prep-javadoc)
$(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE)) $(call JavadocSummary,$(SCTPAPI_OPTIONS_FILE),$(SCTPAPI_PACKAGES_FILE))
$(JAVADOC_CMD) $(JAVADOC_VM_MEMORY_FLAGS) -d $(@D) \ $(JAVADOC_CMD) -d $(@D) \
@$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE) @$(SCTPAPI_OPTIONS_FILE) @$(SCTPAPI_PACKAGES_FILE)
# Create file with javadoc options in it # Create file with javadoc options in it
@@ -1133,42 +1179,6 @@ clean:
# * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line # * MILESTONE defaults to internal unless set to beta, rc, or fcs on command line
# #
echovalues:
@$(ECHO) ""
@$(ECHO) --------------Imports---------------------------
@$(ECHO) "IMPORT_PACKAGES = $(IMPORT_PACKAGES)"
@$(ECHO) "IMPORT_PACKAGE_FILTER = $(IMPORT_PACKAGE_FILTER)"
@$(ECHO) --------------Imports---------------------------
@$(ECHO) ""
@$(ECHO) --------------Shared---------------------------
@$(ECHO) BUILD_NUMBER = $(BUILD_NUMBER)
@$(ECHO) FULL_VERSION = $(FULL_VERSION)
@$(ECHO) JDK_VERSION = $(JDK_VERSION)
@$(ECHO) JDK_MAJOR_VERSION = $(JDK_MAJOR_VERSION)
@$(ECHO) JDK_MINOR_VERSION = $(JDK_MINOR_VERSION)
@$(ECHO) JDK_MICRO_VERSION = $(JDK_MICRO_VERSION)
@$(ECHO) JDK_UPDATE_VERSION = $(JDK_UPDATE_VERSION)
@$(ECHO) JDK_MKTG_VERSION = $(JDK_MKTG_VERSION)
@$(ECHO) JDK_UNDERSCORE_VERSION = $(JDK_UNDERSCORE_VERSION)
@$(ECHO) JDK_MKTG_UNDERSCORE_VERSION = $(JDK_MKTG_UNDERSCORE_VERSION)
@$(ECHO) MARKETING_NUMBER = $(MARKETING_NUMBER)
@$(ECHO) MARKET_NAME = $(MARKET_NAME)
@$(ECHO) MILESTONE = $(MILESTONE)
@$(ECHO) RELEASE = $(RELEASE)
@$(ECHO) USER_RELEASE_SUFFIX = $(USER_RELEASE_SUFFIX)
@$(ECHO) --------------Shared---------------------------
@$(ECHO) ""
@$(ECHO) --------------common/Defs---------------------------
@$(ECHO) "RELEASEDOCS_SOURCEPATH"
@$(ECHO) " SHARE_SRC/classes: $(SHARE_SRC)/classes"
@$(ECHO) " PLATFORM_SRC/classes: $(PLATFORM_SRC)/classes"
@$(ECHO) " GENSRCDIR: $(GENSRCDIR)"
@$(ECHO) " SHARE_SRC/doc/stub: $(SHARE_SRC)/doc/stub"
@$(ECHO) " IMPORTSRCDIR: $(IMPORTSRCDIR)"
@$(ECHO) --------------common/Defs---------------------------
@$(ECHO) ""
############################################################# #############################################################
.PHONY: all docs coredocs rel-docs echovalues otherdocs rel-coredocs \ .PHONY: all docs coredocs rel-docs otherdocs rel-coredocs \
sanitycheckcoredocs $(ALL_OTHER_TARGETS) sanitycheckcoredocs $(ALL_OTHER_TARGETS)

View File

@@ -71,6 +71,8 @@ DOCLETAPI_PKGS = com.sun.javadoc
TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java
TAGLETAPI_PKGS = com.sun.tools.doclets
ATTACH_PKGS = com.sun.tools.attach \ ATTACH_PKGS = com.sun.tools.attach \
com.sun.tools.attach.spi com.sun.tools.attach.spi

View File

@@ -1 +1 @@
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

View File

@@ -1 +1 @@
$(subst com,X01,$(subst org,X02,$(subst sun,X03,$(subst java,X04,$(subst javax,X05,$(subst sun/io,X06,$(subst com/sun,X07,$(subst java/io,X08,$(subst org/omg,X09,$(subst org/w3c,X10,$(subst org/xml,X11,$(subst sun/awt,X12,$(subst sun/net,X13,$(subst sun/nio,X14,$(subst sun/rmi,X15,$(subst java/awt,X16,$(subst java/net,X17,$(subst java/nio,X18,$(subst java/rmi,X19,$(subst META-INF,X20,$(subst sun/font,X21,$(subst sun/misc,X22,$(subst sun/text,X23,$(subst sun/util,X24,$(subst java/lang,X25,$(subst java/math,X26,$(subst java/text,X27,$(subst java/util,X28,$(subst javax/jws,X29,$(subst javax/net,X30,$(subst javax/rmi,X31,$(subst javax/xml,X32,$(subst sun/corba,X33,$(subst sun/print,X34,$(subst sun/swing,X35,$(subst java/beans,X36,$(subst javax/lang,X37,$(subst sun/applet,X38,$(subst sun/java2d,X39,$(subst java/applet,X40,$(subst javax/print,X41,$(subst javax/sound,X42,$(subst javax/swing,X43,$(subst javax/tools,X44,$(subst jdk/classes,X45,$(subst org/relaxng,X46,$(subst sun/reflect,X47,$(subst javax/crypto,X48,$(subst javax/naming,X49,$(subst jaxp/classes,X50,$(subst sun/security,X51,$(subst corba/classes,X52,$(subst java/security,X53,$(subst javax/imageio,X54,$(subst jdk/btclasses,X55,$(subst javax/activity,X56,$(subst javax/security,X57,$(subst jdk/newclasses,X58,$(subst sun/instrument,X59,$(subst sun/management,X60,$(subst corba/btclasses,X61,$(subst jdk/democlasses,X62,$(subst javax/activation,X63,$(subst javax/annotation,X64,$(subst javax/management,X65,$(subst javax/transaction,X66,$(subst jaxws/jaf_classes,X67,$(subst langtools/classes,X68,$(subst META-INF/services,X69,$(subst jdk/newdemoclasses,X70,$(subst javax/accessibility,X71,$(subst jaxws/jaxws_classes,X72, $(subst com,X01,$(subst org,X02,$(subst sun,X03,$(subst java,X04,$(subst javax,X05,$(subst sun/io,X06,$(subst com/sun,X07,$(subst java/io,X08,$(subst org/omg,X09,$(subst org/w3c,X10,$(subst org/xml,X11,$(subst sun/awt,X12,$(subst sun/net,X13,$(subst sun/nio,X14,$(subst sun/rmi,X15,$(subst java/awt,X16,$(subst java/net,X17,$(subst java/nio,X18,$(subst java/rmi,X19,$(subst META-INF,X20,$(subst sun/font,X21,$(subst sun/misc,X22,$(subst sun/text,X23,$(subst sun/util,X24,$(subst java/lang,X25,$(subst java/math,X26,$(subst java/text,X27,$(subst java/util,X28,$(subst javax/jws,X29,$(subst javax/net,X30,$(subst javax/rmi,X31,$(subst javax/xml,X32,$(subst sun/corba,X33,$(subst sun/print,X34,$(subst sun/swing,X35,$(subst java/beans,X36,$(subst javax/lang,X37,$(subst sun/applet,X38,$(subst sun/java2d,X39,$(subst java/applet,X40,$(subst javax/print,X41,$(subst javax/sound,X42,$(subst javax/swing,X43,$(subst javax/tools,X44,$(subst jdk/classes,X45,$(subst org/relaxng,X46,$(subst sun/reflect,X47,$(subst javax/crypto,X48,$(subst javax/naming,X49,$(subst jaxp/classes,X50,$(subst sun/security,X51,$(subst corba/classes,X52,$(subst java/security,X53,$(subst javax/imageio,X54,$(subst jdk/btclasses,X55,$(subst javax/activity,X56,$(subst javax/security,X57,$(subst jdk/newclasses,X58,$(subst sun/instrument,X59,$(subst sun/management,X60,$(subst corba/btclasses,X61,$(subst jdk/democlasses,X62,$(subst javax/activation,X63,$(subst javax/annotation,X64,$(subst javax/management,X65,$(subst javax/transaction,X66,$(subst jaxws/jaf_classes,X67,$(subst langtools/classes,X68,$(subst META-INF/services,X69,$(subst jdk/newdemoclasses,X70,$(subst javax/accessibility,X71,$(subst jaxws/jaxws_classes,X72,

View File

@@ -0,0 +1,100 @@
s/\\u0020/\x20/g
s/\\u003A/\x3A/g
s/\\u006B/\x6B/g
s/\\u0075/\x75/g
s/\\u00A0/\xA0/g
s/\\u00A3/\xA3/g
s/\\u00B0/\xB0/g
s/\\u00B7/\xB7/g
s/\\u00BA/\xBA/g
s/\\u00BF/\xBF/g
s/\\u00C0/\xC0/g
s/\\u00C1/\xC1/g
s/\\u00C2/\xC2/g
s/\\u00C4/\xC4/g
s/\\u00C5/\xC5/g
s/\\u00C8/\xC8/g
s/\\u00C9/\xC9/g
s/\\u00CA/\xCA/g
s/\\u00CD/\xCD/g
s/\\u00CE/\xCE/g
s/\\u00D3/\xD3/g
s/\\u00D4/\xD4/g
s/\\u00D6/\xD6/g
s/\\u00DA/\xDA/g
s/\\u00DC/\xDC/g
s/\\u00DD/\xDD/g
s/\\u00DF/\xDF/g
s/\\u00E0/\xE0/g
s/\\u00E1/\xE1/g
s/\\u00E2/\xE2/g
s/\\u00E3/\xE3/g
s/\\u00E4/\xE4/g
s/\\u00E5/\xE5/g
s/\\u00E6/\xE6/g
s/\\u00E7/\xE7/g
s/\\u00E8/\xE8/g
s/\\u00E9/\xE9/g
s/\\u00EA/\xEA/g
s/\\u00EB/\xEB/g
s/\\u00EC/\xEC/g
s/\\u00ED/\xED/g
s/\\u00EE/\xEE/g
s/\\u00EF/\xEF/g
s/\\u00F1/\xF1/g
s/\\u00F2/\xF2/g
s/\\u00F3/\xF3/g
s/\\u00F4/\xF4/g
s/\\u00F5/\xF5/g
s/\\u00F6/\xF6/g
s/\\u00F9/\xF9/g
s/\\u00FA/\xFA/g
s/\\u00FC/\xFC/g
s/\\u0020/\x20/g
s/\\u003f/\x3f/g
s/\\u006f/\x6f/g
s/\\u0075/\x75/g
s/\\u00a0/\xa0/g
s/\\u00a3/\xa3/g
s/\\u00b0/\xb0/g
s/\\u00ba/\xba/g
s/\\u00bf/\xbf/g
s/\\u00c1/\xc1/g
s/\\u00c4/\xc4/g
s/\\u00c5/\xc5/g
s/\\u00c8/\xc8/g
s/\\u00c9/\xc9/g
s/\\u00ca/\xca/g
s/\\u00cd/\xcd/g
s/\\u00d6/\xd6/g
s/\\u00dc/\xdc/g
s/\\u00dd/\xdd/g
s/\\u00df/\xdf/g
s/\\u00e0/\xe0/g
s/\\u00e1/\xe1/g
s/\\u00e2/\xe2/g
s/\\u00e3/\xe3/g
s/\\u00e4/\xe4/g
s/\\u00e5/\xe5/g
s/\\u00e7/\xe7/g
s/\\u00e8/\xe8/g
s/\\u00e9/\xe9/g
s/\\u00ea/\xea/g
s/\\u00eb/\xeb/g
s/\\u00ec/\xec/g
s/\\u00ed/\xed/g
s/\\u00ee/\xee/g
s/\\u00ef/\xef/g
s/\\u00f0/\xf0/g
s/\\u00f1/\xf1/g
s/\\u00f2/\xf2/g
s/\\u00f3/\xf3/g
s/\\u00f4/\xf4/g
s/\\u00f5/\xf5/g
s/\\u00f6/\xf6/g
s/\\u00f7/\xf7/g
s/\\u00f8/\xf8/g
s/\\u00f9/\xf9/g
s/\\u00fa/\xfa/g
s/\\u00fc/\xfc/g
s/\\u00ff/\xff/g

View File

@@ -58,7 +58,7 @@ int is_cygdrive_here(int pos, char *in, int len)
* Works in place since drive letter is always * Works in place since drive letter is always
* shorter than /cygdrive/ * shorter than /cygdrive/
*/ */
char *replace_cygdrive(char *in) char *replace_cygdrive_cygwin(char *in)
{ {
int len = strlen(in); int len = strlen(in);
char *out = malloc(len+1); char *out = malloc(len+1);
@@ -119,6 +119,61 @@ char *replace_substring(char *in, char *sub, char *rep)
return out; return out;
} }
char* msys_path_list; // @-separated list of paths prefix to look for
char* msys_path_list_end; // Points to last \0 in msys_path_list.
void setup_msys_path_list(char* argument)
{
char* p;
char* drive_letter_pos;
msys_path_list = strdup(&argument[2]);
msys_path_list_end = &msys_path_list[strlen(msys_path_list)];
// Convert all at-sign (@) in path list to \0.
// @ was chosen as separator to minimize risk of other tools messing around with it
p = msys_path_list;
do {
if (p[1] == ':') {
// msys has mangled our path list, restore it from c:/... to /c/...
drive_letter_pos = p+1;
*drive_letter_pos = *p;
*p = '/';
}
// Look for an @ in the list
p = strchr(p, '@');
if (p != NULL) {
*p = '\0';
p++;
}
} while (p != NULL);
}
char *replace_cygdrive_msys(char *in)
{
char* str;
char* prefix;
char* p;
str = strdup(in);
// For each prefix in the path list, search for it and replace /c/... with c:/...
for (prefix = msys_path_list; prefix < msys_path_list_end && prefix != NULL; prefix += strlen(prefix)+1) {
p=str;
while ((p = strstr(p, prefix))) {
char* drive_letter = p+1;
*p = *drive_letter;
*drive_letter = ':';
p++;
}
}
return str;
}
char*(*replace_cygdrive)(char *in) = NULL;
char *files_to_delete[1024]; char *files_to_delete[1024];
int num_files_to_delete = 0; int num_files_to_delete = 0;
@@ -158,7 +213,7 @@ char *fix_at_file(char *in)
atout = fopen(name, "w"); atout = fopen(name, "w");
if (atout == NULL) { if (atout == NULL) {
fprintf(stderr, "Could open temporary file for writing! %s\n", name); fprintf(stderr, "Could not open temporary file for writing! %s\n", name);
exit(-1); exit(-1);
} }
@@ -167,7 +222,13 @@ char *fix_at_file(char *in)
append(&buffer, &buflen, &used, block, blocklen); append(&buffer, &buflen, &used, block, blocklen);
} }
buffer[used] = 0; buffer[used] = 0;
if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "fixpath input from @-file %s: %s\n", &in[1], buffer);
}
fixed = replace_cygdrive(buffer); fixed = replace_cygdrive(buffer);
if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "fixpath converted to @-file %s is: %s\n", name, fixed);
}
fwrite(fixed, strlen(fixed), 1, atout); fwrite(fixed, strlen(fixed), 1, atout);
fclose(atin); fclose(atin);
fclose(atout); fclose(atout);
@@ -194,12 +255,31 @@ int main(int argc, char **argv)
int i; int i;
DWORD exitCode; DWORD exitCode;
if (argc<2) { if (argc<3 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
fprintf(stderr, "Usage: uncygdrive.exe /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt"); fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe /cygdrive/c/x/test.txt");
exit(0); exit(0);
} }
line = replace_cygdrive(strstr(GetCommandLine(), argv[1])); if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "fixpath input line >%s<\n", strstr(GetCommandLine(), argv[1]));
}
if (argv[1][1] == 'c' && argv[1][2] == '\0') {
if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "using cygwin mode\n");
}
replace_cygdrive = replace_cygdrive_cygwin;
} else if (argv[1][1] == 'm') {
if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "using msys mode, with path list: %s\n", &argv[1][2]);
}
setup_msys_path_list(argv[1]);
replace_cygdrive = replace_cygdrive_msys;
} else {
fprintf(stderr, "Unknown mode: %s\n", argv[1]);
exit(-1);
}
line = replace_cygdrive(strstr(GetCommandLine(), argv[2]));
for (i=1; i<argc; ++i) { for (i=1; i<argc; ++i) {
if (argv[i][0] == '@') { if (argv[i][0] == '@') {
@@ -210,8 +290,8 @@ int main(int argc, char **argv)
} }
} }
if (getenv("DEBUG_UNCYGDRIVE") != NULL) { if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "uncygdrive >%s<\n", line); fprintf(stderr, "fixpath converted line >%s<\n", line);
} }
ZeroMemory(&si,sizeof(si)); ZeroMemory(&si,sizeof(si));
@@ -238,9 +318,9 @@ int main(int argc, char **argv)
WaitForSingleObject(pi.hProcess,INFINITE); WaitForSingleObject(pi.hProcess,INFINITE);
GetExitCodeProcess(pi.hProcess,&exitCode); GetExitCodeProcess(pi.hProcess,&exitCode);
if (getenv("DEBUG_UNCYGDRIVE") != NULL) { if (getenv("DEBUG_FIXPATH") != NULL) {
for (i=0; i<num_files_to_delete; ++i) { for (i=0; i<num_files_to_delete; ++i) {
fprintf(stderr, "Not deleting temporary uncygdrive file %s\n", fprintf(stderr, "Not deleting temporary fixpath file %s\n",
files_to_delete[i]); files_to_delete[i]);
} }
} }

29
configure vendored Normal file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
#
# Copyright (c) 2012, 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.
#
# This is a thin wrapper which will call the real configure script, and
# make sure that is called using bash.
this_script_dir=`dirname $0`
bash $this_script_dir/common/autoconf/configure "$@"

View File

@@ -172,3 +172,15 @@ cd879aff5d3cc1f58829aab3116880aa19525b78 jdk8-b43
7e2b179a5b4dbd3f097e28daa00abfcc72ba3e0b jdk8-b48 7e2b179a5b4dbd3f097e28daa00abfcc72ba3e0b jdk8-b48
fe44e58a6bdbeae350ce96aafb49770a5dca5d8a jdk8-b49 fe44e58a6bdbeae350ce96aafb49770a5dca5d8a jdk8-b49
d20d9eb9f093adbf392918c703960ad24c93a331 jdk8-b50 d20d9eb9f093adbf392918c703960ad24c93a331 jdk8-b50
9b0f841ca9f7ee9bacf16a5ab41c4f829276bc6b jdk8-b51
80689ff9cb499837513f18a1136dac7f0686cd55 jdk8-b52
63aeb7a2472fb299134ad7388e0a111a5340b02d jdk8-b53
16c82fc74695bab9b9e0fb05c086a5a08ba0082f jdk8-b54
e8a0e84383d6fbd303ce44bd355fb25972b13286 jdk8-b55
bf1bb47414e178beff67dc255fc3b97bf401f679 jdk8-b56
f3ab4163ae012965fc8acdfc25ce0fece8d6906d jdk8-b57
18462a19f7bd66d38015f61ea549a5e0c0c889a3 jdk8-b58
d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
207ef43ba69ead6cbbab415d81834545e4d46747 jdk8-b60
0e08ba7648fb3faa0986cb217887d7c4990977f3 jdk8-b61
08afb9c6f44f11c3595b01fd0985db64b29834dd jdk8-b62

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -151,16 +151,26 @@ CD = cd # intrinsic unix command
ifeq ($(PLATFORM),windows) ifeq ($(PLATFORM),windows)
ifdef USING_CYGWIN ifdef USING_CYGWIN
# Intrinsic unix command, with backslash-escaped character interpretation # Intrinsic unix command, with backslash-escaped character interpretation
ECHO = $(UNIXCOMMAND_PATH)echo -e ECHO = $(UNIXCOMMAND_PATH)echo -e
ZIPEXE = $(UNIXCOMMAND_PATH)zip ZIPEXE = $(UNIXCOMMAND_PATH)zip
UNZIP = $(UNIXCOMMAND_PATH)unzip UNZIP = $(UNIXCOMMAND_PATH)unzip
# Some CYGWIN nawk versions require BINMODE=w for proper '\r' interpretation
NAWK = $(UNIXCOMMAND_PATH)awk -v BINMODE=w
else else
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip ifdef USING_MSYS
UNZIP = $(UTILS_DEVTOOL_PATH)unzip ECHO = $(UTILS_COMMAND_PATH)echo -e
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
UNZIP = $(UTILS_DEVTOOL_PATH)unzip
NAWK = $(UNIXCOMMAND_PATH)awk
else
ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
UNZIP = $(UTILS_DEVTOOL_PATH)unzip
NAWK = $(UNIXCOMMAND_PATH)awk
endif
endif endif
# Re-define some utilities # Re-define some utilities
LEX =# override GNU Make intrinsic: no lex on windows LEX =# override GNU Make intrinsic: no lex on windows
NAWK = $(UNIXCOMMAND_PATH)awk SHA1SUM = $(UNIXCOMMAND_PATH)openssl sha1
endif endif
# Linux specific # Linux specific

View File

@@ -91,6 +91,15 @@ define OptFullPath
$(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1"; else echo "$1"; fi) $(shell if [ "$1" != "" -a -d "$1" ]; then $(CYGPATH_CMD) "$1"; else echo "$1"; fi)
endef endef
else else
ifdef USING_MSYS
DOSPATH_CMD:=$(shell cd $(JDK_TOPDIR) 2> $(DEV_NULL) && pwd)/make/tools/msys_build_scripts/dospath.sh
define FullPath
$(subst \,/,$(shell $(DOSPATH_CMD) $1))
endef
define OptFullPath
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
endef
else
# Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path # Temporary until we upgrade to MKS 8.7, MKS pwd returns mixed mode path
define FullPath define FullPath
$(shell cd $1 2> $(DEV_NULL) && pwd) $(shell cd $1 2> $(DEV_NULL) && pwd)
@@ -99,6 +108,7 @@ define OptFullPath
$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi) $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
endef endef
endif endif
endif
# System drive # System drive
ifdef SYSTEMDRIVE ifdef SYSTEMDRIVE
@@ -112,14 +122,21 @@ _system_drive:=$(call CheckValue,_system_drive,C:)
# UNIXCOMMAND_PATH: path to where the most common Unix commands are. # UNIXCOMMAND_PATH: path to where the most common Unix commands are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage. # NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifndef UNIXCOMMAND_PATH # With cygwin, use this as is; don't use FullPath on it.
ifdef ALT_UNIXCOMMAND_PATH ifdef ALT_UNIXCOMMAND_PATH
ifdef USING_CYGWIN
UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
else
xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))" xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH)) fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH)) UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
endif
else
ifdef USING_CYGWIN
UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin)
else else
ifdef USING_CYGWIN ifdef USING_MSYS
UNIXCOMMAND_PATH :=$(call PrefixPath,/usr/bin) UNIXCOMMAND_PATH :=$(call PrefixPath,/bin)
else else
ifdef ROOTDIR ifdef ROOTDIR
xROOTDIR :="$(subst \,/,$(ROOTDIR))" xROOTDIR :="$(subst \,/,$(ROOTDIR))"
@@ -131,41 +148,35 @@ ifndef UNIXCOMMAND_PATH
ifneq ($(_rootdir),) ifneq ($(_rootdir),)
UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt) UNIXCOMMAND_PATH :=$(call PrefixPath,$(_rootdir)/mksnt)
endif endif
endif endif # USING_MSYS
endif endif # USING_CYGWIN
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
export UNIXCOMMAND_PATH
endif endif
UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
export UNIXCOMMAND_PATH
# Get version of MKS or CYGWIN # Get version of MKS or CYGWIN
ifdef USING_CYGWIN ifdef USING_MKS
ifndef CYGWIN_VER _MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@')
_CYGWIN_VER :=$(shell $(UNAME)) MKS_VER :=$(call GetVersion,$(_MKS_VER))
CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER)) # At this point, we can re-define FullPath to use DOSNAME_CMD
export CYGWIN_VER CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7)
TRY_DOSNAME:=false
ifeq ($(CHECK_MKS87),same)
TRY_DOSNAME:=true
endif endif
else # MKS # Newer should be ok
_MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@') ifeq ($(CHECK_MKS87),newer)
MKS_VER :=$(call GetVersion,$(_MKS_VER)) TRY_DOSNAME:=true
# At this point, we can re-define FullPath to use DOSNAME_CMD endif
CHECK_MKS87:=$(call CheckVersions,$(MKS_VER),8.7) ifeq ($(TRY_DOSNAME),true)
TRY_DOSNAME:=false ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
ifeq ($(CHECK_MKS87),same) _DOSNAME=$(UNIXCOMMAND_PATH)dosname
TRY_DOSNAME:=true DOSNAME_CMD:=$(_DOSNAME) -s
endif
# Newer should be ok
ifeq ($(CHECK_MKS87),newer)
TRY_DOSNAME:=true
endif
ifeq ($(TRY_DOSNAME),true)
ifeq ($(shell $(UNIXCOMMAND_PATH)dosname -s $(_system_drive)/ 2> $(DEV_NULL)),$(_system_drive)/)
_DOSNAME=$(UNIXCOMMAND_PATH)dosname
DOSNAME_CMD:=$(_DOSNAME) -s
define FullPath define FullPath
$(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL))) $(subst //,/,$(shell echo $1 | $(DOSNAME_CMD) 2> $(DEV_NULL)))
endef endef
endif # test dosname -s endif # test dosname -s
endif # TRY_DOSNAME endif # TRY_DOSNAME
endif # MKS endif # MKS
# We try to get references to what we need via the default component # We try to get references to what we need via the default component
@@ -240,6 +251,8 @@ endif
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.) # DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
# NOTE: Must end with / so that it could be empty, allowing PATH usage. # NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifndef DEVTOOLS_PATH ifndef DEVTOOLS_PATH
# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
ifdef ALT_DEVTOOLS_PATH ifdef ALT_DEVTOOLS_PATH
xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))" xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH)) fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
@@ -248,10 +261,14 @@ ifndef DEVTOOLS_PATH
ifdef USING_CYGWIN ifdef USING_CYGWIN
DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH) DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
else else
xDEVTOOLS_PATH :="$(_system_drive)/utils" ifdef USING_MSYS
fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH)) DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH)) else
endif xDEVTOOLS_PATH :="$(_system_drive)/utils"
fxDEVTOOLS_PATH :=$(call FullPath,$(xDEVTOOLS_PATH))
DEVTOOLS_PATH :=$(call PrefixPath,$(fxDEVTOOLS_PATH))
endif # USING_MSYS
endif # USING_CYGWIN
endif endif
DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH) DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
export DEVTOOLS_PATH export DEVTOOLS_PATH

View File

@@ -65,6 +65,8 @@ PLATFORM_SHARED=done
# REQUIRED_WINDOWS_NAME windows only: basic name of windows # REQUIRED_WINDOWS_NAME windows only: basic name of windows
# REQUIRED_WINDOWS_VERSION windows only: specific version of windows # REQUIRED_WINDOWS_VERSION windows only: specific version of windows
# USING_CYGWIN windows only: true or false # USING_CYGWIN windows only: true or false
# USING_MSYS windows only: true or false
# USING_MKS windows only: true or false
# WINDOWS_NT_VERSION_STRING windows only: long version name # WINDOWS_NT_VERSION_STRING windows only: long version name
# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4 # REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4
# REQUIRED_FREE_SPACE minimum disk space needed for outputdir # REQUIRED_FREE_SPACE minimum disk space needed for outputdir
@@ -327,6 +329,8 @@ endif
# Windows with and without CYGWIN will be slightly different # Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT) ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows PLATFORM = windows
USING_MKS = true
export USING_MKS
OS_VERSION := $(shell uname -r) OS_VERSION := $(shell uname -r)
WINDOWS_NT_VERSION_STRING=Windows_NT WINDOWS_NT_VERSION_STRING=Windows_NT
REQUIRED_MKS_VER=6.1 REQUIRED_MKS_VER=6.1
@@ -339,6 +343,11 @@ ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
WINDOWS_NT_VERSION_STRING=CYGWIN_NT WINDOWS_NT_VERSION_STRING=CYGWIN_NT
REQUIRED_CYGWIN_VER=4.0 REQUIRED_CYGWIN_VER=4.0
endif endif
ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
PLATFORM = windows
USING_MSYS = true
export USING_MSYS
endif
# Platform settings specific to Windows # Platform settings specific to Windows
ifeq ($(PLATFORM), windows) ifeq ($(PLATFORM), windows)

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
package com.sun.corba.se.impl.transport; package com.sun.corba.se.impl.transport;
import java.util.Hashtable; import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.SystemException; import org.omg.CORBA.SystemException;
@@ -68,7 +71,7 @@ public class CorbaResponseWaitingRoomImpl
private CorbaConnection connection; private CorbaConnection connection;
// Maps requestId to an OutCallDesc. // Maps requestId to an OutCallDesc.
private Hashtable out_calls = null; // REVISIT - use int hastable/map final private Map<Integer, OutCallDesc> out_calls;
public CorbaResponseWaitingRoomImpl(ORB orb, CorbaConnection connection) public CorbaResponseWaitingRoomImpl(ORB orb, CorbaConnection connection)
{ {
@@ -76,7 +79,8 @@ public class CorbaResponseWaitingRoomImpl
wrapper = ORBUtilSystemException.get( orb, wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.RPC_TRANSPORT ) ; CORBALogDomains.RPC_TRANSPORT ) ;
this.connection = connection; this.connection = connection;
out_calls = new Hashtable(); out_calls =
Collections.synchronizedMap(new HashMap<Integer, OutCallDesc>());
} }
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@@ -139,7 +143,7 @@ public class CorbaResponseWaitingRoomImpl
return null; return null;
} }
OutCallDesc call = (OutCallDesc)out_calls.get(requestId); OutCallDesc call = out_calls.get(requestId);
if (call == null) { if (call == null) {
throw wrapper.nullOutCall(CompletionStatus.COMPLETED_MAYBE); throw wrapper.nullOutCall(CompletionStatus.COMPLETED_MAYBE);
} }
@@ -197,7 +201,7 @@ public class CorbaResponseWaitingRoomImpl
LocateReplyOrReplyMessage header = (LocateReplyOrReplyMessage) LocateReplyOrReplyMessage header = (LocateReplyOrReplyMessage)
inputObject.getMessageHeader(); inputObject.getMessageHeader();
Integer requestId = new Integer(header.getRequestId()); Integer requestId = new Integer(header.getRequestId());
OutCallDesc call = (OutCallDesc) out_calls.get(requestId); OutCallDesc call = out_calls.get(requestId);
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".responseReceived: id/" dprint(".responseReceived: id/"
@@ -248,7 +252,6 @@ public class CorbaResponseWaitingRoomImpl
public int numberRegistered() public int numberRegistered()
{ {
// Note: Hashtable.size() is not synchronized
return out_calls.size(); return out_calls.size();
} }
@@ -264,29 +267,41 @@ public class CorbaResponseWaitingRoomImpl
dprint(".signalExceptionToAllWaiters: " + systemException); dprint(".signalExceptionToAllWaiters: " + systemException);
} }
OutCallDesc call; synchronized (out_calls) {
java.util.Enumeration e = out_calls.elements(); if (orb.transportDebugFlag) {
while(e.hasMoreElements()) { dprint(".signalExceptionToAllWaiters: out_calls size :" +
call = (OutCallDesc) e.nextElement(); out_calls.size());
}
synchronized(call.done){ for (OutCallDesc call : out_calls.values()) {
// anything waiting for BufferManagerRead's fragment queue if (orb.transportDebugFlag) {
// needs to be cancelled dprint(".signalExceptionToAllWaiters: signaling " +
CorbaMessageMediator corbaMsgMediator = call);
(CorbaMessageMediator)call.messageMediator; }
CDRInputObject inputObject = synchronized(call.done) {
(CDRInputObject)corbaMsgMediator.getInputObject(); try {
// IMPORTANT: If inputObject is null, then no need to tell // anything waiting for BufferManagerRead's fragment queue
// BufferManagerRead to cancel request processing. // needs to be cancelled
if (inputObject != null) { CorbaMessageMediator corbaMsgMediator =
BufferManagerReadStream bufferManager = (CorbaMessageMediator)call.messageMediator;
(BufferManagerReadStream)inputObject.getBufferManager(); CDRInputObject inputObject =
int requestId = corbaMsgMediator.getRequestId(); (CDRInputObject)corbaMsgMediator.getInputObject();
bufferManager.cancelProcessing(requestId); // IMPORTANT: If inputObject is null, then no need to tell
// BufferManagerRead to cancel request processing.
if (inputObject != null) {
BufferManagerReadStream bufferManager =
(BufferManagerReadStream)inputObject.getBufferManager();
int requestId = corbaMsgMediator.getRequestId();
bufferManager.cancelProcessing(requestId);
}
} catch (Exception e) {
} finally {
// attempt to wake up waiting threads in all cases
call.inputObject = null;
call.exception = systemException;
call.done.notifyAll();
}
} }
call.inputObject = null;
call.exception = systemException;
call.done.notify();
} }
} }
} }
@@ -294,7 +309,7 @@ public class CorbaResponseWaitingRoomImpl
public MessageMediator getMessageMediator(int requestId) public MessageMediator getMessageMediator(int requestId)
{ {
Integer id = new Integer(requestId); Integer id = new Integer(requestId);
OutCallDesc call = (OutCallDesc) out_calls.get(id); OutCallDesc call = out_calls.get(id);
if (call == null) { if (call == null) {
// This can happen when getting early reply fragments for a // This can happen when getting early reply fragments for a
// request which has completed (e.g., client marshaling error). // request which has completed (e.g., client marshaling error).

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -1521,7 +1521,7 @@ public class SocketOrChannelConnectionImpl
// connection and give them the SystemException; // connection and give them the SystemException;
responseWaitingRoom.signalExceptionToAllWaiters(systemException); responseWaitingRoom.signalExceptionToAllWaiters(systemException);
} finally {
if (contactInfo != null) { if (contactInfo != null) {
((OutboundConnectionCache)getConnectionCache()).remove(contactInfo); ((OutboundConnectionCache)getConnectionCache()).remove(contactInfo);
} else if (acceptor != null) { } else if (acceptor != null) {
@@ -1542,7 +1542,6 @@ public class SocketOrChannelConnectionImpl
writeUnlock(); writeUnlock();
} finally {
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".purgeCalls<-: " dprint(".purgeCalls<-: "
+ minor_code + "/" + die + "/" + lockHeld + minor_code + "/" + die + "/" + lockHeld

View File

@@ -1631,7 +1631,7 @@ public class StubGenerator extends sun.rmi.rmic.iiop.Generator {
// Write data members... // Write data members...
p.pln(); p.pln();
p.pln("private " + getName(theType) + " target = null;"); p.pln("volatile private " + getName(theType) + " target = null;");
p.pln(); p.pln();
// Write the ids... // Write the ids...
@@ -1695,6 +1695,10 @@ public class StubGenerator extends sun.rmi.rmic.iiop.Generator {
if (remoteMethods.length > 0) { if (remoteMethods.length > 0) {
p.plnI("try {"); p.plnI("try {");
p.pln(getName(theType) + " target = this.target;");
p.plnI("if (target == null) {");
p.pln("throw new java.io.IOException();");
p.pOln("}");
p.plnI(idExtInputStream + " "+in+" = "); p.plnI(idExtInputStream + " "+in+" = ");
p.pln("(" + idExtInputStream + ") "+_in+";"); p.pln("(" + idExtInputStream + ") "+_in+";");
p.pO(); p.pO();

View File

@@ -267,3 +267,25 @@ e3619706a7253540a2d94e9e841acaab8ace7038 jdk8-b49
72e0362c3f0cfacbbac8af8a5b9d2e182f21c17b hs24-b18 72e0362c3f0cfacbbac8af8a5b9d2e182f21c17b hs24-b18
58f237a9e83af6ded0d2e2c81d252cd47c0f4c45 jdk8-b50 58f237a9e83af6ded0d2e2c81d252cd47c0f4c45 jdk8-b50
3b3ad16429701b2eb6712851c2f7c5a726eb2cbe hs24-b19 3b3ad16429701b2eb6712851c2f7c5a726eb2cbe hs24-b19
663fc23da8d51c4c0552cbcb17ffc85f5869d4fd jdk8-b51
4c8f2a12e757e7a808aa85827573e09f75d7459f hs24-b20
6d0436885201db3f581523344a734793bb989549 jdk8-b52
54240c1b8e87758f28da2c6a569a926fd9e0910a jdk8-b53
9e3ae661284dc04185b029d85440fe7811f1ed07 hs24-b21
e8fb566b94667f88462164defa654203f0ab6820 jdk8-b54
09ea7e0752b306b8ae74713aeb4eb6263e1c6836 hs24-b22
af0c8a0808516317333dcf9af15567cdd52761ce jdk8-b55
6124ff4218296c91e4a72f1a76c064892d39d61b jdk8-b56
9b076bc3ab67d42d1d02144ef8dcd6006a7fc0d6 hs25-b01
d70102c4cb73158902acaa6016f47c7bc14e0d67 jdk8-b57
5f54277c67f755a377999bff904ab48aa63ddaf9 hs25-b02
6bb378c50828e9d76fb2653d1712c66ea8fc47db jdk8-b58
f2e12eb74117c917c0bb264694c02de4a6a15a10 hs25-b03
8a1a6b9b4f20fd2f6a12441d638e51f19a82db19 jdk8-b59
1cc7a2a11d00832e3d07f81f3744a6883422db7e hs25-b04
3cfd05b2219a29649741a52637696f06acf24a4e jdk8-b60
b261523fe66c40a02968f0aa7e73602491bb3386 hs25-b05
4547dc71db765276e027b0c2780b724bae0a07d3 jdk8-b61
d0337c31c8be7716369b4e7c3bd5f352983c6a06 hs25-b06
dccd40de8db1fa96f186e6179907818d75320440 jdk8-b62
dc16fe422c535ecd4e9f80fb814a1bb9704da6f5 hs25-b07

View File

@@ -38,10 +38,10 @@ Available commands:
assert true | false <font color="red">turn on/off asserts in SA code</font> assert true | false <font color="red">turn on/off asserts in SA code</font>
attach pid | exec core <font color="red">attach SA to a process or core</font> attach pid | exec core <font color="red">attach SA to a process or core</font>
class name <font color="red">find a Java class from debuggee and print oop</font> class name <font color="red">find a Java class from debuggee and print oop</font>
classes <font color="red">print all loaded Java classes with klassOop</font> classes <font color="red">print all loaded Java classes with Klass*</font>
detach <font color="red">detach SA from current target</font> detach <font color="red">detach SA from current target</font>
dis address [ length ] <font color="red">disassemble (sparc/x86) specified number of instructions from given address</font> dis address [ length ] <font color="red">disassemble (sparc/x86) specified number of instructions from given address</font>
dumpclass { address | name } [ directory ] <font color="red">dump .class file for given klassOop or class name</font> dumpclass { address | name } [ directory ] <font color="red">dump .class file for given Klass* or class name</font>
dumpheap [ file ] <font color="red">dump heap in hprof binary format</font> dumpheap [ file ] <font color="red">dump heap in hprof binary format</font>
echo [ true | false ] <font color="red">turn on/off command echo mode</font> echo [ true | false ] <font color="red">turn on/off command echo mode</font>
examine [ address/count ] | [ address,address] <font color="red">show contents of memory from given address</font> examine [ address/count ] | [ address,address] <font color="red">show contents of memory from given address</font>
@@ -51,7 +51,7 @@ Available commands:
help [ command ] <font color="red">print help message for all commands or just given command</font> help [ command ] <font color="red">print help message for all commands or just given command</font>
history <font color="red">show command history. usual !command-number syntax works.</font> history <font color="red">show command history. usual !command-number syntax works.</font>
inspect expression <font color="red">inspect a given oop</font> inspect expression <font color="red">inspect a given oop</font>
jdis address <font color="red">show bytecode disassembly of a given methodOop</font> jdis address <font color="red">show bytecode disassembly of a given Method*</font>
jhisto <font color="red">show Java heap histogram</font> jhisto <font color="red">show Java heap histogram</font>
jseval script <font color="red">evaluate a given string as JavaScript code</font> jseval script <font color="red">evaluate a given string as JavaScript code</font>
jsload file <font color="red">load and evaluate a JavaScript file</font> jsload file <font color="red">load and evaluate a JavaScript file</font>
@@ -59,7 +59,7 @@ Available commands:
livenmethods <font color="red">show all live nmethods</font> livenmethods <font color="red">show all live nmethods</font>
mem address [ length ] <font color="red">show contents of memory -- also shows closest ELF/COFF symbol if found</font> mem address [ length ] <font color="red">show contents of memory -- also shows closest ELF/COFF symbol if found</font>
pmap <font color="red">show Solaris pmap-like output</font> pmap <font color="red">show Solaris pmap-like output</font>
print expression <font color="red">print given klassOop, methodOop or arbitrary address</font> print expression <font color="red">print given Klass*, Method* or arbitrary address</font>
printas type expression <font color="red">print given address as given HotSpot type. eg. print JavaThread &lt;address&gt;</font> printas type expression <font color="red">print given address as given HotSpot type. eg. print JavaThread &lt;address&gt;</font>
printstatics [ type ] <font color="red">print static fields of given HotSpot type (or all types if none specified)</font> printstatics [ type ] <font color="red">print static fields of given HotSpot type (or all types if none specified)</font>
pstack [-v] <font color="red">show mixed mode stack trace for all Java, non-Java threads. -v is verbose mode</font> pstack [-v] <font color="red">show mixed mode stack trace for all Java, non-Java threads. -v is verbose mode</font>

View File

@@ -1,254 +0,0 @@
/*
* Copyright (c) 2003, 2004, 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.
*
*/
import java.io.*;
import java.util.*;
/**
<p> This class finds transitive closure of dependencies from a given
root set of classes. If your project has lots of .class files and you
want to ship only those .class files which are used (transitively)
from a root set of classes, then you can use this utility. </p> <p>
How does it work?</p>
<p> We walk through all constant pool entries of a given class and
find all modified UTF-8 entries. Anything that looks like a class name is
considered as a class and we search for that class in the given
classpath. If we find a .class of that name, then we add that class to
list.</p>
<p> We could have used CONSTANT_ClassInfo type constants only. But
that will miss classes used through Class.forName or xyz.class
construct. But, if you refer to a class name in some other string we
would include it as dependency :(. But this is quite unlikely
anyway. To look for exact Class.forName argument(s) would involve
bytecode analysis. Also, we handle only simple reflection. If you
accept name of a class from externally (for eg properties file or
command line args for example, this utility will not be able to find
that dependency. In such cases, include those classes in the root set.
</p>
*/
public class ClosureFinder {
private Collection roots; // root class names Collection<String>
private Map visitedClasses; // set of all dependencies as a Map
private String classPath; // classpath to look for .class files
private String[] pathComponents; // classpath components
private static final boolean isWindows = File.separatorChar != '/';
public ClosureFinder(Collection roots, String classPath) {
this.roots = roots;
this.classPath = classPath;
parseClassPath();
}
// parse classPath into pathComponents array
private void parseClassPath() {
List paths = new ArrayList();
StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
while (st.hasMoreTokens())
paths.add(st.nextToken());
Object[] arr = paths.toArray();
pathComponents = new String[arr.length];
System.arraycopy(arr, 0, pathComponents, 0, arr.length);
}
// if output is aleady not computed, compute it now
// result is a map from class file name to base path where the .class was found
public Map find() {
if (visitedClasses == null) {
visitedClasses = new HashMap();
computeClosure();
}
return visitedClasses;
}
// compute closure for all given root classes
private void computeClosure() {
for (Iterator rootsItr = roots.iterator(); rootsItr.hasNext();) {
String name = (String) rootsItr.next();
name = name.substring(0, name.indexOf(".class"));
computeClosure(name);
}
}
// looks up for .class in pathComponents and returns
// base path if found, else returns null
private String lookupClassFile(String classNameAsPath) {
for (int i = 0; i < pathComponents.length; i++) {
File f = new File(pathComponents[i] + File.separator +
classNameAsPath + ".class");
if (f.exists()) {
if (isWindows) {
String name = f.getName();
// Windows reports special devices AUX,NUL,CON as files
// under any directory. It does not care about file extention :-(
if (name.compareToIgnoreCase("AUX.class") == 0 ||
name.compareToIgnoreCase("NUL.class") == 0 ||
name.compareToIgnoreCase("CON.class") == 0) {
return null;
}
}
return pathComponents[i];
}
}
return null;
}
// from JVM spec. 2'nd edition section 4.4
private static final int CONSTANT_Class = 7;
private static final int CONSTANT_FieldRef = 9;
private static final int CONSTANT_MethodRef = 10;
private static final int CONSTANT_InterfaceMethodRef = 11;
private static final int CONSTANT_String = 8;
private static final int CONSTANT_Integer = 3;
private static final int CONSTANT_Float = 4;
private static final int CONSTANT_Long = 5;
private static final int CONSTANT_Double = 6;
private static final int CONSTANT_NameAndType = 12;
private static final int CONSTANT_Utf8 = 1;
// whether a given string may be a class name?
private boolean mayBeClassName(String internalClassName) {
int len = internalClassName.length();
for (int s = 0; s < len; s++) {
char c = internalClassName.charAt(s);
if (!Character.isJavaIdentifierPart(c) && c != '/')
return false;
}
return true;
}
// compute closure for a given class
private void computeClosure(String className) {
if (visitedClasses.get(className) != null) return;
String basePath = lookupClassFile(className);
if (basePath != null) {
visitedClasses.put(className, basePath);
try {
File classFile = new File(basePath + File.separator + className + ".class");
FileInputStream fis = new FileInputStream(classFile);
DataInputStream dis = new DataInputStream(fis);
// look for .class signature
if (dis.readInt() != 0xcafebabe) {
System.err.println(classFile.getAbsolutePath() + " is not a valid .class file");
return;
}
// ignore major and minor version numbers
dis.readShort();
dis.readShort();
// read number of constant pool constants
int numConsts = (int) dis.readShort();
String[] strings = new String[numConsts];
// zero'th entry is unused
for (int cpIndex = 1; cpIndex < numConsts; cpIndex++) {
int constType = (int) dis.readByte();
switch (constType) {
case CONSTANT_Class:
case CONSTANT_String:
dis.readShort(); // string name index;
break;
case CONSTANT_FieldRef:
case CONSTANT_MethodRef:
case CONSTANT_InterfaceMethodRef:
case CONSTANT_NameAndType:
case CONSTANT_Integer:
case CONSTANT_Float:
// all these are 4 byte constants
dis.readInt();
break;
case CONSTANT_Long:
case CONSTANT_Double:
// 8 byte constants
dis.readLong();
// occupies 2 cp entries
cpIndex++;
break;
case CONSTANT_Utf8: {
strings[cpIndex] = dis.readUTF();
break;
}
default:
System.err.println("invalid constant pool entry");
return;
}
}
// now walk thru the string constants and look for class names
for (int s = 0; s < numConsts; s++) {
if (strings[s] != null && mayBeClassName(strings[s]))
computeClosure(strings[s].replace('/', File.separatorChar));
}
} catch (IOException exp) {
// ignore for now
}
}
}
// a sample main that accepts roots classes in a file and classpath as args
public static void main(String[] args) {
if (args.length != 2) {
System.err.println("Usage: ClosureFinder <root class file> <class path>");
System.exit(1);
}
List roots = new ArrayList();
try {
FileInputStream fis = new FileInputStream(args[0]);
DataInputStream dis = new DataInputStream(fis);
String line = null;
while ((line = dis.readLine()) != null) {
if (isWindows) {
line = line.replace('/', File.separatorChar);
}
roots.add(line);
}
} catch (IOException exp) {
System.err.println(exp.getMessage());
System.exit(2);
}
ClosureFinder cf = new ClosureFinder(roots, args[1]);
Map out = cf.find();
Iterator res = out.keySet().iterator();
for(; res.hasNext(); ) {
String className = (String) res.next();
System.out.println(className + ".class");
}
}
}

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -41,10 +41,7 @@ endif
PKGLIST = \ PKGLIST = \
sun.jvm.hotspot \ sun.jvm.hotspot \
sun.jvm.hotspot.asm \ sun.jvm.hotspot.asm \
sun.jvm.hotspot.asm.amd64 \
sun.jvm.hotspot.asm.ia64 \
sun.jvm.hotspot.asm.sparc \ sun.jvm.hotspot.asm.sparc \
sun.jvm.hotspot.asm.x86 \
sun.jvm.hotspot.bugspot \ sun.jvm.hotspot.bugspot \
sun.jvm.hotspot.bugspot.tree \ sun.jvm.hotspot.bugspot.tree \
sun.jvm.hotspot.c1 \ sun.jvm.hotspot.c1 \
@@ -138,10 +135,7 @@ com.sun.java.swing.ui
FILELIST = \ FILELIST = \
sun/jvm/hotspot/*.java \ sun/jvm/hotspot/*.java \
sun/jvm/hotspot/asm/*.java \ sun/jvm/hotspot/asm/*.java \
sun/jvm/hotspot/asm/amd64/*.java \
sun/jvm/hotspot/asm/ia64/*.java \
sun/jvm/hotspot/asm/sparc/*.java \ sun/jvm/hotspot/asm/sparc/*.java \
sun/jvm/hotspot/asm/x86/*.java \
sun/jvm/hotspot/bugspot/*.java \ sun/jvm/hotspot/bugspot/*.java \
sun/jvm/hotspot/bugspot/tree/*.java \ sun/jvm/hotspot/bugspot/tree/*.java \
sun/jvm/hotspot/c1/*.java \ sun/jvm/hotspot/c1/*.java \

View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
# This file sets common environment variables for all SA scripts # This file sets common environment variables for all SA scripts
OS=`uname` OS=`uname`
STARTDIR=`dirname $0` STARTDIR=`(cd \`dirname $0 \`; pwd)`
ARCH=`uname -m` ARCH=`uname -m`
if [ "x$SA_JAVA" = "x" ]; then if [ "x$SA_JAVA" = "x" ]; then

View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,11 @@
. `dirname $0`/saenv.sh . `dirname $0`/saenv.sh
if [ -f $STARTDIR/sa.jar ] ; then if [ -f $STARTDIR/../lib/sa-jdi.jar ] ; then
CP=$STARTDIR/sa.jar CP=$STARTDIR/../lib/sa-jdi.jar
else else
CP=$STARTDIR/../build/classes CP=$STARTDIR/../build/classes
fi fi
$SA_JAVA -classpath $CP ${OPTIONS} -Djava.rmi.server.codebase=file:/$CP -Djava.security.policy=$STARTDIR\/grantAll.policy sun.jvm.hotspot.DebugServer $* $STARTDIR/java -classpath $CP ${OPTIONS} -Djava.rmi.server.codebase=file://$CP -Djava.security.policy=${STARTDIR}/grantAll.policy sun.jvm.hotspot.DebugServer $*

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2002, 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,13 @@
#import <mach/mach.h> #import <mach/mach.h>
#import <mach/mach_types.h> #import <mach/mach_types.h>
#import <sys/sysctl.h> #import <sys/sysctl.h>
#import <stdio.h>
#import <stdarg.h>
#import <stdlib.h> #import <stdlib.h>
#import <strings.h>
#import <dlfcn.h>
#import <limits.h>
#import <errno.h>
jboolean debug = JNI_FALSE; jboolean debug = JNI_FALSE;
@@ -60,6 +66,9 @@ static task_t getTask(JNIEnv *env, jobject this_obj) {
#define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;} #define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;}
#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; } #define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;} #define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
#define CHECK_EXCEPTION_CLEAR if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); }
#define CHECK_EXCEPTION_CLEAR_VOID if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); return; }
#define CHECK_EXCEPTION_CLEAR_(value) if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); return value; }
static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) { static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
(*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg); (*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
@@ -404,3 +413,164 @@ JNF_COCOA_ENTER(env);
} }
JNF_COCOA_EXIT(env); JNF_COCOA_EXIT(env);
} }
/*
* Class: sun_jvm_hotspot_asm_Disassembler
* Method: load_library
* Signature: (Ljava/lang/String;)L
*/
JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_asm_Disassembler_load_1library(JNIEnv * env,
jclass disclass,
jstring jrepath_s,
jstring libname_s) {
uintptr_t func = 0;
const char* error_message = NULL;
const char* java_home;
jboolean isCopy;
uintptr_t *handle = NULL;
const char * jrepath = (*env)->GetStringUTFChars(env, jrepath_s, &isCopy); // like $JAVA_HOME/jre/lib/sparc/
const char * libname = (*env)->GetStringUTFChars(env, libname_s, &isCopy);
char buffer[128];
/* Load the hsdis library */
void* hsdis_handle;
hsdis_handle = dlopen(libname, RTLD_LAZY | RTLD_GLOBAL);
if (hsdis_handle == NULL) {
snprintf(buffer, sizeof(buffer), "%s%s", jrepath, libname);
hsdis_handle = dlopen(buffer, RTLD_LAZY | RTLD_GLOBAL);
}
if (hsdis_handle != NULL) {
func = (uintptr_t)dlsym(hsdis_handle, "decode_instructions_virtual");
}
if (func == 0) {
error_message = dlerror();
fprintf(stderr, "%s\n", error_message);
}
(*env)->ReleaseStringUTFChars(env, libname_s, libname);
(*env)->ReleaseStringUTFChars(env, jrepath_s, jrepath);
if (func == 0) {
/* Couldn't find entry point. error_message should contain some
* platform dependent error message.
*/
THROW_NEW_DEBUGGER_EXCEPTION(error_message);
}
return (jlong)func;
}
/* signature of decode_instructions_virtual from hsdis.h */
typedef void* (*decode_func)(uintptr_t start_va, uintptr_t end_va,
unsigned char* start, uintptr_t length,
void* (*event_callback)(void*, const char*, void*),
void* event_stream,
int (*printf_callback)(void*, const char*, ...),
void* printf_stream,
const char* options);
/* container for call back state when decoding instructions */
typedef struct {
JNIEnv* env;
jobject dis;
jobject visitor;
jmethodID handle_event;
jmethodID raw_print;
char buffer[4096];
} decode_env;
/* event callback binding to Disassembler.handleEvent */
static void* event_to_env(void* env_pv, const char* event, void* arg) {
decode_env* denv = (decode_env*)env_pv;
JNIEnv* env = denv->env;
jstring event_string = (*env)->NewStringUTF(env, event);
jlong result = (*env)->CallLongMethod(env, denv->dis, denv->handle_event, denv->visitor,
event_string, (jlong) (uintptr_t)arg);
/* ignore exceptions for now */
CHECK_EXCEPTION_CLEAR_((void *)0);
return (void*)(uintptr_t)result;
}
/* printing callback binding to Disassembler.rawPrint */
static int printf_to_env(void* env_pv, const char* format, ...) {
jstring output;
va_list ap;
int cnt;
decode_env* denv = (decode_env*)env_pv;
JNIEnv* env = denv->env;
size_t flen = strlen(format);
const char* raw = NULL;
if (flen == 0) return 0;
if (flen < 2 ||
strchr(format, '%') == NULL) {
raw = format;
} else if (format[0] == '%' && format[1] == '%' &&
strchr(format+2, '%') == NULL) {
// happens a lot on machines with names like %foo
flen--;
raw = format+1;
}
if (raw != NULL) {
jstring output = (*env)->NewStringUTF(env, raw);
(*env)->CallVoidMethod(env, denv->dis, denv->raw_print, denv->visitor, output);
CHECK_EXCEPTION_CLEAR;
return (int) flen;
}
va_start(ap, format);
cnt = vsnprintf(denv->buffer, sizeof(denv->buffer), format, ap);
va_end(ap);
output = (*env)->NewStringUTF(env, denv->buffer);
(*env)->CallVoidMethod(env, denv->dis, denv->raw_print, denv->visitor, output);
CHECK_EXCEPTION_CLEAR;
return cnt;
}
/*
* Class: sun_jvm_hotspot_asm_Disassembler
* Method: decode
* Signature: (Lsun/jvm/hotspot/asm/InstructionVisitor;J[BLjava/lang/String;J)V
*/
JNIEXPORT void JNICALL Java_sun_jvm_hotspot_asm_Disassembler_decode(JNIEnv * env,
jobject dis,
jobject visitor,
jlong startPc,
jbyteArray code,
jstring options_s,
jlong decode_instructions_virtual) {
jboolean isCopy;
jbyte* start = (*env)->GetByteArrayElements(env, code, &isCopy);
jbyte* end = start + (*env)->GetArrayLength(env, code);
const char * options = (*env)->GetStringUTFChars(env, options_s, &isCopy);
jclass disclass = (*env)->GetObjectClass(env, dis);
decode_env denv;
denv.env = env;
denv.dis = dis;
denv.visitor = visitor;
/* find Disassembler.handleEvent callback */
denv.handle_event = (*env)->GetMethodID(env, disclass, "handleEvent",
"(Lsun/jvm/hotspot/asm/InstructionVisitor;Ljava/lang/String;J)J");
CHECK_EXCEPTION_CLEAR_VOID
/* find Disassembler.rawPrint callback */
denv.raw_print = (*env)->GetMethodID(env, disclass, "rawPrint",
"(Lsun/jvm/hotspot/asm/InstructionVisitor;Ljava/lang/String;)V");
CHECK_EXCEPTION_CLEAR_VOID
/* decode the buffer */
(*(decode_func)(uintptr_t)decode_instructions_virtual)(startPc,
startPc + end - start,
(unsigned char*)start,
end - start,
&event_to_env, (void*) &denv,
&printf_to_env, (void*) &denv,
options);
/* cleanup */
(*env)->ReleaseByteArrayElements(env, code, start, JNI_ABORT);
(*env)->ReleaseStringUTFChars(env, options_s, options);
}

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -210,7 +210,6 @@ static map_info* core_lookup(struct ps_prochandle *ph, uintptr_t addr)
// mapped. This structure gets written to a file. It is not a class, // mapped. This structure gets written to a file. It is not a class,
// so that the compilers don't add any compiler-private data to it. // so that the compilers don't add any compiler-private data to it.
// Refer to CompactingPermGenGen::n_regions in compactingPermGenGen.hpp
#define NUM_SHARED_MAPS 4 #define NUM_SHARED_MAPS 4
// Refer to FileMapInfo::_current_version in filemap.hpp // Refer to FileMapInfo::_current_version in filemap.hpp
@@ -234,7 +233,7 @@ struct FileMapHeader {
char _read_only; // read only space? char _read_only; // read only space?
char _allow_exec; // executable code in space? char _allow_exec; // executable code in space?
} _space[NUM_SHARED_MAPS]; // was _space[CompactingPermGenGen::n_regions]; } _space[NUM_SHARED_MAPS];
// Ignore the rest of the FileMapHeader. We don't need those fields here. // Ignore the rest of the FileMapHeader. We don't need those fields here.
}; };

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -55,11 +55,11 @@ static jmethodID listAdd_ID = 0;
#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; } #define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;} #define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) { void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
(*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg); (*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
} }
static struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) { struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) {
jlong ptr = (*env)->GetLongField(env, this_obj, p_ps_prochandle_ID); jlong ptr = (*env)->GetLongField(env, this_obj, p_ps_prochandle_ID);
return (struct ps_prochandle*)(intptr_t)ptr; return (struct ps_prochandle*)(intptr_t)ptr;
} }
@@ -280,6 +280,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
return (err == PS_OK)? array : 0; return (err == PS_OK)? array : 0;
} }
#if defined(i386) || defined(ia64) || defined(amd64) || defined(sparc) || defined(sparcv9)
JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0 JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
(JNIEnv *env, jobject this_obj, jint lwp_id) { (JNIEnv *env, jobject this_obj, jint lwp_id) {
@@ -410,3 +411,4 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
(*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT); (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT);
return array; return array;
} }
#endif

View File

@@ -36,25 +36,33 @@ SOURCES = salibelf.c \
INCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux INCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux
OBJS = $(SOURCES:.c=.o) OBJS = $(SOURCES:%.c=$(ARCH)/%.o) $(ARCH)/sadis.o
LIBS = -lthread_db LIBS = -lthread_db
CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -D_FILE_OFFSET_BITS=64 CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -I$(ARCH)
LIBSA = $(ARCH)/libsaproc.so LIBSA = $(ARCH)/libsaproc.so
all: $(LIBSA) all: $(LIBSA)
LinuxDebuggerLocal.o: LinuxDebuggerLocal.c $(ARCH):
$(JAVAH) -jni -classpath ../../../build/classes \ mkdir $(ARCH)
$(ARCH)/LinuxDebuggerLocal.o: LinuxDebuggerLocal.c
$(JAVAH) -jni -classpath ../../../build/classes -d $(ARCH) \
sun.jvm.hotspot.debugger.x86.X86ThreadContext \ sun.jvm.hotspot.debugger.x86.X86ThreadContext \
sun.jvm.hotspot.debugger.sparc.SPARCThreadContext \ sun.jvm.hotspot.debugger.sparc.SPARCThreadContext \
sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
$(GCC) $(CFLAGS) $< $(GCC) $(CFLAGS) $< -o $@
.c.obj: $(ARCH)/sadis.o: ../../share/native/sadis.c
$(GCC) $(CFLAGS) $(JAVAH) -jni -classpath ../../../build/classes -d $(ARCH) \
sun.jvm.hotspot.asm.Disassembler
$(GCC) $(CFLAGS) $< -o $@
$(ARCH)/%.o: %.c
$(GCC) $(CFLAGS) $< -o $@
ifndef LDNOMAP ifndef LDNOMAP
LFLAGS_LIBSA = -Xlinker --version-script=mapfile LFLAGS_LIBSA = -Xlinker --version-script=mapfile
@@ -68,9 +76,8 @@ ifneq ($(_HAS_HASH_STYLE_GNU),)
endif endif
LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE) LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE)
$(LIBSA): $(OBJS) mapfile $(LIBSA): $(ARCH) $(OBJS) mapfile
if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
test.o: test.c test.o: test.c
$(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c $(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c
@@ -79,7 +86,4 @@ test: test.o
$(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS) $(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS)
clean: clean:
rm -rf $(LIBSA) rm -fr $(ARCH)
rm -rf $(OBJS)
rmdir $(ARCH)

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,15 @@
#ifndef _LIBPROC_H_ #ifndef _LIBPROC_H_
#define _LIBPROC_H_ #define _LIBPROC_H_
#include <jni.h>
#include <unistd.h> #include <unistd.h>
#include <stdint.h> #include <stdint.h>
#include "proc_service.h" #include "proc_service.h"
#if defined(arm) || defined(ppc)
#include "libproc_md.h"
#endif
#if defined(sparc) || defined(sparcv9) #if defined(sparc) || defined(sparcv9)
/* /*
If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64 If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
@@ -139,4 +144,8 @@ uintptr_t lookup_symbol(struct ps_prochandle* ph, const char* object_name,
// address->nearest symbol lookup. return NULL for no symbol // address->nearest symbol lookup. return NULL for no symbol
const char* symbol_for_pc(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* poffset); const char* symbol_for_pc(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* poffset);
struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj);
void throw_new_debugger_exception(JNIEnv* env, const char* errMsg);
#endif //__LIBPROC_H_ #endif //__LIBPROC_H_

View File

@@ -1,7 +1,5 @@
# #
# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
#
# Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -22,7 +20,6 @@
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
#
# Define public interface. # Define public interface.
@@ -40,6 +37,10 @@ SUNWprivate_1.1 {
Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_readBytesFromProcess0; Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_readBytesFromProcess0;
Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0; Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0;
# Disassembler interface
Java_sun_jvm_hotspot_asm_Disassembler_decode;
Java_sun_jvm_hotspot_asm_Disassembler_load_1library;
# proc_service.h functions - to be used by libthread_db # proc_service.h functions - to be used by libthread_db
ps_getpid; ps_getpid;
ps_pglobal_lookup; ps_pglobal_lookup;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -209,7 +209,6 @@ static map_info* core_lookup(struct ps_prochandle *ph, uintptr_t addr)
// mapped. This structure gets written to a file. It is not a class, // mapped. This structure gets written to a file. It is not a class,
// so that the compilers don't add any compiler-private data to it. // so that the compilers don't add any compiler-private data to it.
// Refer to CompactingPermGenGen::n_regions in compactingPermGenGen.hpp
#define NUM_SHARED_MAPS 4 #define NUM_SHARED_MAPS 4
// Refer to FileMapInfo::_current_version in filemap.hpp // Refer to FileMapInfo::_current_version in filemap.hpp
@@ -233,7 +232,7 @@ struct FileMapHeader {
char _read_only; // read only space? char _read_only; // read only space?
char _allow_exec; // executable code in space? char _allow_exec; // executable code in space?
} _space[NUM_SHARED_MAPS]; // was _space[CompactingPermGenGen::n_regions]; } _space[NUM_SHARED_MAPS];
// Ignore the rest of the FileMapHeader. We don't need those fields here. // Ignore the rest of the FileMapHeader. We don't need those fields here.
}; };

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
# sparcv9: Build the 64 bit sparcv9 version in ./sparcv9 # sparcv9: Build the 64 bit sparcv9 version in ./sparcv9
# i386: Build the 32 bit i386 version in ./i386 # i386: Build the 32 bit i386 version in ./i386
.PHONY: sparc sparcv9 i386 .PHONY: sparc sparcv9 i386 amd64
ARCH_ORIG = $(shell uname -p) ARCH_ORIG = $(shell uname -p)
@@ -36,6 +36,8 @@ RM := /usr/bin/rm
MKDIRS := /usr/bin/mkdir -p MKDIRS := /usr/bin/mkdir -p
CLASSES_DIR = ../../../../build/classes CLASSES_DIR = ../../../../build/classes
SAPROC_INCLUDES=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris
SADIS=../../../share/native/sadis.c
ifeq "$(ARCH_ORIG)" "i386" ifeq "$(ARCH_ORIG)" "i386"
ALL_TARGET = i386 $(filter amd64,$(shell isalist)) ALL_TARGET = i386 $(filter amd64,$(shell isalist))
@@ -43,6 +45,11 @@ else
ALL_TARGET = sparc sparcv9 ALL_TARGET = sparc sparcv9
endif endif
CFLAGS/i386 =
CFLAGS/amd64 = -xarch=amd64
CFLAGS/sparc = -xarch=v8
CFLAGS/sparv9 = -xarch=v9
all:: $(ALL_TARGET) all:: $(ALL_TARGET)
javahomecheck:: javahomecheck::
@@ -51,34 +58,13 @@ javahomecheck::
exit 1 ; \ exit 1 ; \
fi fi
i386:: javahomecheck i386 amd64 sparc sparcv9:: javahomecheck
$(MKDIRS) $@ $(MKDIRS) $@
@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal @$(JAVA_HOME)/bin/javah -classpath $(CLASSES_DIR) -d $@ -jni sun.jvm.hotspot.asm.Disassembler sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
CC -G -KPIC -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \ CC $(CFLAGS/$@) -c -g -Kpic ${SAPROC_INCLUDES} -I$@ saproc.cpp -o $@/saproc.o
-M mapfile -o $@/libsaproc.so -ldemangle cc $(CFLAGS/$@) -c -g -Kpic ${SAPROC_INCLUDES} -I$@ $(SADIS) -o $@/sadis.o
CC -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc CC $(CFLAGS/$@) -g -G -Kpic $@/saproc.o $@/sadis.o -M mapfile -o $@/libsaproc.so -ldemangle
CC $(CFLAGS/$@) -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
amd64:: javahomecheck
$(MKDIRS) $@
@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
CC -G -KPIC -xarch=amd64 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
-M mapfile -o $@/libsaproc.so -ldemangle
CC -xarch=amd64 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
sparc:: javahomecheck
$(MKDIRS) $@
@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
CC -G -KPIC -xarch=v8 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
-M mapfile -o $@/libsaproc.so -ldemangle
CC -xarch=v8 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
sparcv9:: javahomecheck
$(MKDIRS) $@
@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
CC -G -KPIC -xarch=v9 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
-M mapfile -o $@/libsaproc.so -ldemangle
CC -xarch=v9 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc
clean:: clean::
$(RM) -rf sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal.h $(RM) -rf sparc sparcv9 i386 amd64
$(RM) -rf sparc sparcv9 i386

View File

@@ -1,7 +1,5 @@
# #
# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
#
# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -22,10 +20,8 @@
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
#
# Define public interface. # Define public interface.
SUNWprivate_1.1 { SUNWprivate_1.1 {
global: global:
Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_attach0__Ljava_lang_String_2; Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_attach0__Ljava_lang_String_2;
@@ -47,6 +43,9 @@ SUNWprivate_1.1 {
Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_writeBytesToProcess0; Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_writeBytesToProcess0;
# this is needed by saproc_audit.c to redirect opens in libproc.so # this is needed by saproc_audit.c to redirect opens in libproc.so
libsaproc_open; libsaproc_open;
local: # Disassembler interface
Java_sun_jvm_hotspot_asm_Disassembler_decode;
Java_sun_jvm_hotspot_asm_Disassembler_load_1library;
local:
*; *;
}; };

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -510,7 +510,6 @@ wrapper_fill_cframe_list(void *cd, const prgregset_t regs, uint_t argc,
// mapped. This structure gets written to a file. It is not a class, so // mapped. This structure gets written to a file. It is not a class, so
// that the compilers don't add any compiler-private data to it. // that the compilers don't add any compiler-private data to it.
// Refer to CompactingPermGenGen::n_regions in compactingPermGenGen.hpp
const int NUM_SHARED_MAPS = 4; const int NUM_SHARED_MAPS = 4;
// Refer to FileMapInfo::_current_version in filemap.hpp // Refer to FileMapInfo::_current_version in filemap.hpp
@@ -531,7 +530,7 @@ struct FileMapHeader {
bool _read_only; // read only space? bool _read_only; // read only space?
bool _allow_exec; // executable code in space? bool _allow_exec; // executable code in space?
} _space[NUM_SHARED_MAPS]; // was _space[CompactingPermGenGen::n_regions]; } _space[NUM_SHARED_MAPS];
// Ignore the rest of the FileMapHeader. We don't need those fields here. // Ignore the rest of the FileMapHeader. We don't need those fields here.
}; };

View File

@@ -1,5 +1,5 @@
# #
# Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@ WINDBG_LIB32=$(WINDBG_HOME)/sdk/lib/i386
WINDBG_LIB_IA64=$(WINDBG_HOME)/sdk/lib/ia64 WINDBG_LIB_IA64=$(WINDBG_HOME)/sdk/lib/ia64
WINDBG_LIB_AMD64=$(WINDBG_HOME)/sdk/lib/amd64 WINDBG_LIB_AMD64=$(WINDBG_HOME)/sdk/lib/amd64
SADIS=../../../share/native/sadis.c
# These do not need to be optimized (don't run a lot of code) and it # These do not need to be optimized (don't run a lot of code) and it
# will be useful to have the assertion checks in place # will be useful to have the assertion checks in place
@@ -57,23 +59,29 @@ ia64: ia64/$(SAWINDBGDLL)
amd64: amd64/$(SAWINDBGDLL) amd64: amd64/$(SAWINDBGDLL)
i386/$(SAWINDBGDLL) : sawindbg.cpp i386/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
@ mkdir -p i386 @ mkdir -p i386
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.x86.X86ThreadContext @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.x86.X86ThreadContext
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
@ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sawindbg.pch" /Fo"i386/" /Fd"i386/" /c sawindbg.cpp @ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sawindbg.pch" /Fo"i386/" /Fd"i386/" /c sawindbg.cpp
$(LINK32) /out:$@ /DLL i386/sawindbg.obj $(LIBS32) @ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sadis.pch" /Fo"i386/" /Fd"i386/" /c $(SADIS)
$(LINK32) /out:$@ /DLL i386/sawindbg.obj i386/sadis.obj $(LIBS32)
ia64/$(SAWINDBGDLL) : sawindbg.cpp ia64/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
@ mkdir -p ia64 @ mkdir -p ia64
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.ia64.IA64ThreadContext @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.ia64.IA64ThreadContext
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sawindbg.pch" /Fo"ia64/" /Fd"ia64/" /c sawindbg.cpp @ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sawindbg.pch" /Fo"ia64/" /Fd"ia64/" /c sawindbg.cpp
$(LINK64) /out:$@ /DLL ia64/sawindbg.obj $(LIBS_IA64) @ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sadis.pch" /Fo"ia64/" /Fd"ia64/" /c $(SADIS)
$(LINK64) /out:$@ /DLL ia64/sawindbg.obj ia64/sadis.obj $(LIBS_IA64)
amd64/$(SAWINDBGDLL) : sawindbg.cpp amd64/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
@ mkdir -p amd64 @ mkdir -p amd64
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sawindbg.pch" /Fo"amd64/" /Fd"amd64/" /c sawindbg.cpp @ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sawindbg.pch" /Fo"amd64/" /Fd"amd64/" /c sawindbg.cpp
$(LINK64) /out:$@ /DLL amd64/sawindbg.obj $(LIBS_AMD64) @ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sadis.pch" /Fo"amd64/" /Fd"amd64/" /c $(SADIS)
$(LINK64) /out:$@ /DLL amd64/sawindbg.obj amd64/sadis.obj $(LIBS_AMD64)
clean: clean:
rm *.h rm *.h

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,7 @@ import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*; import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.opto.*; import sun.jvm.hotspot.opto.*;
import sun.jvm.hotspot.ci.*; import sun.jvm.hotspot.ci.*;
import sun.jvm.hotspot.asm.*;
import sun.jvm.hotspot.runtime.*; import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.utilities.*; import sun.jvm.hotspot.utilities.*;
import sun.jvm.hotspot.utilities.soql.*; import sun.jvm.hotspot.utilities.soql.*;
@@ -564,6 +565,71 @@ public class CommandProcessor {
} }
} }
}, },
// decode raw address
new Command("dis", "dis address [length]", false) {
public void doit(Tokens t) {
int tokens = t.countTokens();
if (tokens != 1 && tokens != 2) {
usage();
return;
}
String name = t.nextToken();
Address addr = null;
int len = 0x10; // default length
try {
addr = VM.getVM().getDebugger().parseAddress(name);
} catch (NumberFormatException e) {
out.println(e);
return;
}
if (tokens == 2) {
try {
len = Integer.parseInt(t.nextToken());
} catch (NumberFormatException e) {
out.println(e);
return;
}
}
HTMLGenerator generator = new HTMLGenerator(false);
out.println(generator.genHTMLForRawDisassembly(addr, len));
}
},
// decode codeblob or nmethod
new Command("disassemble", "disassemble address", false) {
public void doit(Tokens t) {
int tokens = t.countTokens();
if (tokens != 1) {
usage();
return;
}
String name = t.nextToken();
Address addr = null;
try {
addr = VM.getVM().getDebugger().parseAddress(name);
} catch (NumberFormatException e) {
out.println(e);
return;
}
HTMLGenerator generator = new HTMLGenerator(false);
out.println(generator.genHTML(addr));
}
},
// print Java bytecode disassembly
new Command("jdis", "jdis address", false) {
public void doit(Tokens t) {
int tokens = t.countTokens();
if (tokens != 1) {
usage();
return;
}
Address a = VM.getVM().getDebugger().parseAddress(t.nextToken());
Method m = (Method)Metadata.instantiateWrapperFor(a);
HTMLGenerator html = new HTMLGenerator(false);
out.println(html.genHTML(m));
}
},
new Command("revptrs", "revptrs address", false) { new Command("revptrs", "revptrs address", false) {
public void doit(Tokens t) { public void doit(Tokens t) {
int tokens = t.countTokens(); int tokens = t.countTokens();
@@ -634,29 +700,57 @@ public class CommandProcessor {
} else { } else {
String s = t.nextToken(); String s = t.nextToken();
if (s.equals("-a")) { if (s.equals("-a")) {
HeapVisitor iterator = new DefaultHeapVisitor() { SystemDictionary sysDict = VM.getVM().getSystemDictionary();
public boolean doObj(Oop obj) { sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
if (obj instanceof MethodData) { public void visit(Klass k) {
Method m = ((MethodData)obj).getMethod(); if (k instanceof InstanceKlass) {
out.println("MethodData " + obj.getHandle() + " for " + MethodArray methods = ((InstanceKlass)k).getMethods();
for (int i = 0; i < methods.length(); i++) {
Method m = methods.at(i);
MethodData mdo = m.getMethodData();
if (mdo != null) {
out.println("MethodData " + mdo.getAddress() + " for " +
"method " + m.getMethodHolder().getName().asString() + "." + "method " + m.getMethodHolder().getName().asString() + "." +
m.getName().asString() + m.getName().asString() +
m.getSignature().asString() + "@" + m.getHandle()); m.getSignature().asString() + "@" + m.getAddress());
((MethodData)obj).printDataOn(out); mdo.printDataOn(out);
} }
return false;
} }
}; }
VM.getVM().getObjectHeap().iteratePerm(iterator); }
}
);
} else { } else {
Address a = VM.getVM().getDebugger().parseAddress(s); Address a = VM.getVM().getDebugger().parseAddress(s);
OopHandle handle = a.addOffsetToAsOopHandle(0); MethodData mdo = (MethodData) Metadata.instantiateWrapperFor(a);
MethodData mdo = (MethodData)VM.getVM().getObjectHeap().newOop(handle);
mdo.printDataOn(out); mdo.printDataOn(out);
} }
} }
} }
}, },
new Command("printall", "printall", false) {
// Print every MDO in the heap or the one referenced by expression.
public void doit(Tokens t) {
if (t.countTokens() != 0) {
usage();
} else {
SystemDictionary sysDict = VM.getVM().getSystemDictionary();
sysDict.allClassesDo(new SystemDictionary.ClassVisitor() {
public void visit(Klass k) {
if (k instanceof InstanceKlass && ((InstanceKlass)k).getConstants().getCache() != null) {
MethodArray methods = ((InstanceKlass)k).getMethods();
for (int i = 0; i < methods.length(); i++) {
Method m = methods.at(i);
HTMLGenerator gen = new HTMLGenerator(false);
out.println(gen.genHTML(m));
}
}
}
}
);
}
}
},
new Command("dumpideal", "dumpideal { -a | id }", false) { new Command("dumpideal", "dumpideal { -a | id }", false) {
// Do a full dump of the nodes reachabile from root in each compiler thread. // Do a full dump of the nodes reachabile from root in each compiler thread.
public void doit(Tokens t) { public void doit(Tokens t) {
@@ -1229,7 +1323,7 @@ public class CommandProcessor {
} }
}; };
VM.getVM().getObjectHeap().iterateRaw(iterator); VM.getVM().getObjectHeap().iterateRaw(iterator);
} else if (type.equals("heap") || type.equals("perm")) { } else if (type.equals("heap")) {
HeapVisitor iterator = new DefaultHeapVisitor() { HeapVisitor iterator = new DefaultHeapVisitor() {
public boolean doObj(Oop obj) { public boolean doObj(Oop obj) {
int index = 0; int index = 0;
@@ -1246,11 +1340,7 @@ public class CommandProcessor {
return false; return false;
} }
}; };
if (type.equals("heap")) {
VM.getVM().getObjectHeap().iterate(iterator); VM.getVM().getObjectHeap().iterate(iterator);
} else {
VM.getVM().getObjectHeap().iteratePerm(iterator);
}
} else if (type.equals("codecache")) { } else if (type.equals("codecache")) {
CodeCacheVisitor v = new CodeCacheVisitor() { CodeCacheVisitor v = new CodeCacheVisitor() {
public void prologue(Address start, Address end) { public void prologue(Address start, Address end) {

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -998,7 +998,7 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
curFrame.addressOfInterpreterFrameLocal((int) interpreterFrameMethod.getMaxLocals() + offset), curFrame.addressOfInterpreterFrameLocal((int) interpreterFrameMethod.getMaxLocals() + offset),
"Interpreter locals area for frame with SP = " + curFrame.getSP())); "Interpreter locals area for frame with SP = " + curFrame.getSP()));
} }
String methodAnno = "Interpreter frame methodOop"; String methodAnno = "Interpreter frame Method*";
if (interpreterFrameMethod == null) { if (interpreterFrameMethod == null) {
methodAnno += " (BAD OOP)"; methodAnno += " (BAD OOP)";
} }
@@ -1054,13 +1054,6 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
} }
} }
if (bad) {
// Try perm gen
if (heap.permGen().isIn(handle)) {
anno = "PermGen ";
bad = false;
}
}
} else if (collHeap instanceof ParallelScavengeHeap) { } else if (collHeap instanceof ParallelScavengeHeap) {
ParallelScavengeHeap heap = (ParallelScavengeHeap) collHeap; ParallelScavengeHeap heap = (ParallelScavengeHeap) collHeap;
if (heap.youngGen().isIn(handle)) { if (heap.youngGen().isIn(handle)) {
@@ -1069,9 +1062,6 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
} else if (heap.oldGen().isIn(handle)) { } else if (heap.oldGen().isIn(handle)) {
anno = "PSOldGen "; anno = "PSOldGen ";
bad = false; bad = false;
} else if (heap.permGen().isIn(handle)) {
anno = "PSPermGen ";
bad = false;
} }
} else { } else {
// Optimistically assume the oop isn't bad // Optimistically assume the oop isn't bad

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@@ -43,10 +43,6 @@ import sun.jvm.hotspot.utilities.*;
* highest-level factory for VM data structures. It makes it simple * highest-level factory for VM data structures. It makes it simple
* to start up the debugging system. </P> * to start up the debugging system. </P>
* *
* <P> FIXME: need to add a way to configure the paths to dbx and the
* DSO from the outside. However, this should work for now for
* internal use. </P>
*
* <P> FIXME: especially with the addition of remote debugging, this * <P> FIXME: especially with the addition of remote debugging, this
* has turned into a mess; needs rethinking. </P> * has turned into a mess; needs rethinking. </P>
*/ */
@@ -87,30 +83,7 @@ public class HotSpotAgent {
private String[] jvmLibNames; private String[] jvmLibNames;
// FIXME: make these configurable, i.e., via a dotfile; also
// consider searching within the JDK from which this Java executable
// comes to find them
private static final String defaultDbxPathPrefix = "/net/jano.sfbay/export/disk05/hotspot/sa";
private static final String defaultDbxSvcAgentDSOPathPrefix = "/net/jano.sfbay/export/disk05/hotspot/sa";
static void showUsage() { static void showUsage() {
System.out.println(" You can also pass these -D options to java to specify where to find dbx and the \n" +
" Serviceability Agent plugin for dbx:");
System.out.println(" -DdbxPathName=<path-to-dbx-executable>\n" +
" Default is derived from dbxPathPrefix");
System.out.println(" or");
System.out.println(" -DdbxPathPrefix=<xxx>\n" +
" where xxx is the path name of a dir structure that contains:\n" +
" <os>/<arch>/bin/dbx\n" +
" The default is " + defaultDbxPathPrefix);
System.out.println(" and");
System.out.println(" -DdbxSvcAgentDSOPathName=<path-to-dbx-serviceability-agent-module>\n" +
" Default is determined from dbxSvcAgentDSOPathPrefix");
System.out.println(" or");
System.out.println(" -DdbxSvcAgentDSOPathPrefix=<xxx>\n" +
" where xxx is the pathname of a dir structure that contains:\n" +
" <os>/<arch>/bin/lib/libsvc_agent_dbx.so\n" +
" The default is " + defaultDbxSvcAgentDSOPathPrefix);
} }
public HotSpotAgent() { public HotSpotAgent() {
@@ -549,7 +522,13 @@ public class HotSpotAgent {
machDesc = new MachineDescriptionSPARC32Bit(); machDesc = new MachineDescriptionSPARC32Bit();
} }
} else { } else {
throw new DebuggerException("Linux only supported on x86/ia64/amd64/sparc/sparc64"); try {
machDesc = (MachineDescription)
Class.forName("sun.jvm.hotspot.debugger.MachineDescription" +
cpu.toUpperCase()).newInstance();
} catch (Exception e) {
throw new DebuggerException("Linux not supported on machine type " + cpu);
}
} }
LinuxDebuggerLocal dbg = LinuxDebuggerLocal dbg =

Some files were not shown because too many files have changed in this diff Show More