[patch] add missing include in nativeInst_<arch>.cpp

View: New views
6 Messages — Rating Filter:   Alert me  

[patch] add missing include in nativeInst_<arch>.cpp

by Matthias Klose-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

unsure if this is related to zero/shark, but at least that's in the upstream
sources for OpenJDK6.

These include failures are usually seen, when not using precompiled headers
(which is a useful thing to track down compiler bugs).

attached are two patches to fix the include problem, and one to disable the use
of precompiled headers setting an envvar. This way release builds could be built
with and without precompiled headers.

   Matthias

[icedtea-no-precompiled.patch]

--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2009-10-30 11:54:26.000000000 +0100
+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2009-10-30 11:55:34.000000000 +0100
@@ -34,13 +34,14 @@
 CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
 CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
 
+ifeq (,$(DISABLE_PRECOMPILED_HEADER))
 # check for precompiled headers support
 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
 USE_PRECOMPILED_HEADER=1
 PRECOMPILED_HEADER_DIR=.
 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
 endif
-
+endif
 
 #------------------------------------------------------------------------
 # Compiler flags
--- openjdk/hotspot/make/solaris/makefiles/gcc.make~ 2009-10-30 11:54:26.000000000 +0100
+++ openjdk/hotspot/make/solaris/makefiles/gcc.make 2009-10-30 11:56:05.000000000 +0100
@@ -45,12 +45,14 @@
 $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
 
 
+ifeq (,$(DISABLE_PRECOMPILED_HEADER))
 # check for precompiled headers support
 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
 USE_PRECOMPILED_HEADER=1
 PRECOMPILED_HEADER_DIR=.
 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
 endif
+endif
 
 
 #------------------------------------------------------------------------


[hotspot-include-fixes.patch]

--- openjdk/hotspot/src/share/vm/includeDB_core~ 2009-10-29 11:37:30.000000000 +0100
+++ openjdk/hotspot/src/share/vm/includeDB_core 2009-10-30 11:14:33.000000000 +0100
@@ -2942,6 +2942,7 @@
 mutex_<os_family>.inline.hpp            thread_<os_family>.inline.hpp
 
 nativeInst_<arch>.cpp                   assembler_<arch>.inline.hpp
+nativeInst_<arch>.cpp                   cppInterpreter.hpp
 nativeInst_<arch>.cpp                   handles.hpp
 nativeInst_<arch>.cpp                   nativeInst_<arch>.hpp
 nativeInst_<arch>.cpp                   oop.inline.hpp


Re: [patch] add missing include in nativeInst_<arch>.cpp

by Ivan Krylov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Matthias,

Can you say why do you want to change default option to precompiled=off
? Precompilation helps to build hotspot *a lot* faster.
If you need not to use pch just call
make USE_PRECOMPILED_HEADER=
For debugging purposes you may also want to use HOTSPOT_BUILD_JOBS=1 to
disable parallel build.

Thanks,

Ivan

Matthias Klose wrote:

> unsure if this is related to zero/shark, but at least that's in the
> upstream sources for OpenJDK6.
>
> These include failures are usually seen, when not using precompiled
> headers (which is a useful thing to track down compiler bugs).
>
> attached are two patches to fix the include problem, and one to
> disable the use of precompiled headers setting an envvar. This way
> release builds could be built with and without precompiled headers.
>
>   Matthias


Re: [patch] add missing include in nativeInst_<arch>.cpp

by Volker Simonis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Using precompiled headers can hide missing include dependecies -
that's a fact and has already been discussed several times on this
list. Just because building with precompiled headers is *so much*
faster, most developers don't build without precompiled headers and
eventually submit changes which introduce dependencies which are not
reflected in the corresponding includeDB files and only compile by
chance (and precompiled headers:)

I would threfore strongly suggest to run a compilation *WITHOUT*
precompiled headers as preintegration test so prevent such problems in
the future.

Regards,
Volker

PS: there still exist compilers which don't support precomiled headers...

On 11/4/09, Ivan Krylov <Ivan.Krylov@...> wrote:

> Hello Matthias,
>
>  Can you say why do you want to change default option to precompiled=off ?
> Precompilation helps to build hotspot *a lot* faster.
>  If you need not to use pch just call
>  make USE_PRECOMPILED_HEADER=
>  For debugging purposes you may also want to use HOTSPOT_BUILD_JOBS=1 to
> disable parallel build.
>
>  Thanks,
>
>  Ivan
>
>
>  Matthias Klose wrote:
>
> > unsure if this is related to zero/shark, but at least that's in the
> upstream sources for OpenJDK6.
> >
> > These include failures are usually seen, when not using precompiled
> headers (which is a useful thing to track down compiler bugs).
> >
> > attached are two patches to fix the include problem, and one to disable
> the use of precompiled headers setting an envvar. This way release builds
> could be built with and without precompiled headers.
> >
> >  Matthias
> >
>
>

Re: [patch] add missing include in nativeInst_<arch>.cpp

by Ivan Krylov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I would threfore strongly suggest to run a compilation *WITHOUT*
> precompiled headers as preintegration test

This sounds like a very good suggestion to me.

Thanks,

Ivan



Volker Simonis wrote:

> Using precompiled headers can hide missing include dependecies -
> that's a fact and has already been discussed several times on this
> list. Just because building with precompiled headers is *so much*
> faster, most developers don't build without precompiled headers and
> eventually submit changes which introduce dependencies which are not
> reflected in the corresponding includeDB files and only compile by
> chance (and precompiled headers:)
>
> I would threfore strongly suggest to run a compilation *WITHOUT*
> precompiled headers as preintegration test so prevent such problems in
> the future.
>
> Regards,
> Volker
>
> PS: there still exist compilers which don't support precomiled headers...
>
> On 11/4/09, Ivan Krylov <Ivan.Krylov@...> wrote:
>  
>> Hello Matthias,
>>
>>  Can you say why do you want to change default option to precompiled=off ?
>> Precompilation helps to build hotspot *a lot* faster.
>>  If you need not to use pch just call
>>  make USE_PRECOMPILED_HEADER=
>>  For debugging purposes you may also want to use HOTSPOT_BUILD_JOBS=1 to
>> disable parallel build.
>>
>>  Thanks,
>>
>>  Ivan
>>
>>
>>  Matthias Klose wrote:
>>
>>    
>>> unsure if this is related to zero/shark, but at least that's in the
>>>      
>> upstream sources for OpenJDK6.
>>    
>>> These include failures are usually seen, when not using precompiled
>>>      
>> headers (which is a useful thing to track down compiler bugs).
>>    
>>> attached are two patches to fix the include problem, and one to disable
>>>      
>> the use of precompiled headers setting an envvar. This way release builds
>> could be built with and without precompiled headers.
>>    
>>>  Matthias
>>>
>>>      
>>    


Re: [patch] add missing include in nativeInst_<arch>.cpp

by gnu_andrew :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/4 Ivan Krylov <Ivan.Krylov@...>:
> Hello Matthias,
>
> Can you say why do you want to change default option to precompiled=off ?
> Precompilation helps to build hotspot *a lot* faster.
> If you need not to use pch just call
> make USE_PRECOMPILED_HEADER=

Won't gcc.make still set it to 1 during the build? i.e. isn't
USE_PRECOMPILED_HEADER= the default anyway?

I presume the other include fix can be pushed without problem?

> For debugging purposes you may also want to use HOTSPOT_BUILD_JOBS=1 to
> disable parallel build.
>
> Thanks,
>
> Ivan
>
> Matthias Klose wrote:
>>
>> unsure if this is related to zero/shark, but at least that's in the
>> upstream sources for OpenJDK6.
>>
>> These include failures are usually seen, when not using precompiled
>> headers (which is a useful thing to track down compiler bugs).
>>
>> attached are two patches to fix the include problem, and one to disable
>> the use of precompiled headers setting an envvar. This way release builds
>> could be built with and without precompiled headers.
>>
>>  Matthias
>
>



--
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

Re: [patch] add missing include in nativeInst_<arch>.cpp

by Ivan Krylov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrew,

>Won't gcc.make still set it to 1 during the build? i.e. isn't
>USE_PRECOMPILED_HEADER= the default anyway?

Apparently no. It is easy enough to try and see yourself.
My understanding of how gmake works is that what is set in command line is passed down to the next makefile in a recursive call via MAKEFLAGS variable.
And we do have recursive call call of make.
However if the value was passed to make via environment variable - it does get overwritten by a makefile (unless -e option is given).

Thanks,
Ivan





Andrew John Hughes wrote:

> 2009/11/4 Ivan Krylov <Ivan.Krylov@...>:
>  
>> Hello Matthias,
>>
>> Can you say why do you want to change default option to precompiled=off ?
>> Precompilation helps to build hotspot *a lot* faster.
>> If you need not to use pch just call
>> make USE_PRECOMPILED_HEADER=
>>    
>
> Won't gcc.make still set it to 1 during the build? i.e. isn't
> USE_PRECOMPILED_HEADER= the default anyway?
>
> I presume the other include fix can be pushed without problem?
>
>  
>> For debugging purposes you may also want to use HOTSPOT_BUILD_JOBS=1 to
>> disable parallel build.
>>
>> Thanks,
>>
>> Ivan
>>
>> Matthias Klose wrote:
>>    
>>> unsure if this is related to zero/shark, but at least that's in the
>>> upstream sources for OpenJDK6.
>>>
>>> These include failures are usually seen, when not using precompiled
>>> headers (which is a useful thing to track down compiler bugs).
>>>
>>> attached are two patches to fix the include problem, and one to disable
>>> the use of precompiled headers setting an envvar. This way release builds
>>> could be built with and without precompiled headers.
>>>
>>>  Matthias
>>>      
>>    
>
>
>
>