Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax_platform property set to ppc on ppcle #29

Closed
lumpfish opened this issue Jun 20, 2018 · 3 comments
Closed

javax_platform property set to ppc on ppcle #29

lumpfish opened this issue Jun 20, 2018 · 3 comments

Comments

@lumpfish
Copy link
Contributor

lumpfish commented Jun 20, 2018

openjdk.build/include/top.xml contains a macro <get-platform-arch> which appears to be returning ppc when executing on ppcle, even though the java.os.arch java system property is set correctly to ppcle.

Looking at the code, this may be the issue:

<condition property="@{property}" value="ppcle">
	<and>
		<contains string="@{arch}" substring="ppcle"/>
	</and>
</condition>
<condition property="@{property}" value="ppc">
	<and>
		<contains string="@{arch}" substring="ppc"/>
	</and>
</condition>

The second match for 'ppc' is true whether the arch is 'ppc' or 'ppcle', so the code to set the property to 'ppc' will be run in both cases. What is puzzling though is that I thought properties in ant were immutable, so the setting the property a second time would have no effect. Perhaps setting a property via a macro in this way means that is not true?
We can test this by reversing the two conditions - check for ppc first and then for ppcle.
@Mesbah-Alam - do you have a test environment you could check this theory out on?

@Mesbah-Alam
Copy link
Contributor

Yes, I'll test and report back!

@lumpfish
Copy link
Contributor Author

The error was actually that java.os.arch contains ppc64le on this platform, not ppcle, so the check was incorrect. The ant property was immutable as expected.

@Mesbah-Alam
Copy link
Contributor

As found out in the test, the only change needed was

<condition property="@{property}" value="ppcle">
	<and>
		<contains string="@{arch}" substring="ppc64le"/>
	</and>
</condition>

as os.arch contains ppc64le, not ppcle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants