Looks good to me. - Roy

-----Original Message-----
From: Steve Ellcey [mailto:s...@cup.hp.com] 
Sent: Wednesday, June 30, 2010 10:14 AM
To: open64-devel@lists.sourceforge.net
Subject: [Open64-devel] Patch to fix configure/make bug involving C++ profile 
library build

During open64 testing we discovered that profile-directed optimizations were 
not working with my configure/make changes.  The problem is that due to some 
bugs my configure/make changes don't work for open64 libraries that are built 
from C++ sources.  The only such library is the instrumentation library
(osprey/instrumentation/libinstr2) used to generate profile data for profile 
directed optimizations.

This patch fixes the C++ build problems and allows us to correctly generate 
profile data.  The main problem with using the just built C++ compiler while 
building the open64 libraries was using the correct header files.  
Unfortunately, the header path during the build includes the GNU target name 
(i.e.  x86_64-redhat-linux) so I  had to ensure that that string was available 
during compilation when setting the include directories to search.

The patch includes:

        configure.ac: pass the GCC_DIR directory name and the
        GCC_CONFIGURE_TARG to makefiles.

        configure: Regenerate from new configure.ac file.

        osprey/Makefile.gsetup.in: Make BUILD_SRC, the top-level
        source directory (parent of the GCC_DIR), GCC_DIR, and
        GCC_CONFIGURE_TARG available.

        osprey/driver/Makefile.gbase: Pass BUILD_SRC, GCC_DIR,
        and GCC_CONFIGURE_TARG in to compilations via -D.

        osprey/driver/phases.c: Use BUILD_SRC, GCC_DIR, and
        GCC_CONFIGURE_TARG to set include search path when
        building C++ programs using the -run-build option.

        osprey/driver/opt_actions.c: Use xgcc to run C++
        under -run-build instead of g++.

        osprey/wgen/main.c: Do not make C++ check
        dependent on cc1plus having a '42' suffix on the
        executable name.


Attached are the actual code changes.  Can one of the overseers approve this 
patch for checkin?

Steve Ellcey
s...@cup.hp.com


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to