Description of problem: According to the packaging guidelines, all packages must pass predefined %{_optflags} to C and C++ compiler. Not doing so has various security, performance and compatibility implications. OpenJDK ignores those. Version-Release number of selected component (if applicable): java-1.6.0-openjdk-1.6.0.0-0.2.b06.fc9
Gary, do you foresee zero having any problems with these flags? -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
I am not successful in building java-1.6.0-openjdk with those CFLAGS and CPPFLAGS set.
Created attachment 297963 [details] Build output with flags set Built like so: ./configure --with-openjdk && make CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables" CPPFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables"
Created attachment 297965 [details] Output with stderr redirected.
This does work if we pass the CFLAGS to ./configure instead. I am testing builds on x86_64 and x86.
I can't see it being a problem. zero passes only -m{31,32,64} at the moment, but I was wondering if I ought to be passing any -mtune options so that solves that :)
I have a patch to fix this. Once I complete a bit of smoke testing, I will commit the changes to the spec file and rebuild java-1.6.0-openjdk.
After testing out this fix, I noticed that ant is now broken. I have not built this into rawhide yet. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Finally fixed. Building into rawhide now.