You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2008/02/20 00:54:15 UTC

Re: svn commit: r627618 - /stdcxx/trunk/etc/config/GNUmakefile.cfg

Hi Farid,

This change seems to have broken the config test dependency detection
logic and caused the EDG eccp build regression described in STDCXX-733.
I assigned the issue to you but just in case you miss it among all the
other traffic on issues@s.a.o... Can you please take a look into it
whenever you have chance?

     http://issues.apache.org/jira/browse/STDCXX-733

Incidentally, out of curiosity, what is this change supposed to do?

Thanks
Martin

faridz@apache.org wrote:
> Author: faridz
> Date: Wed Feb 13 16:09:02 2008
> New Revision: 627618
> 
> URL: http://svn.apache.org/viewvc?rev=627618&view=rev
> Log:
> 2008-02-14  Farid Zaripov  <fa...@epam.com>
> 
> 	* etc/config/GNUmakefile.cfg: Check for the LDOPTS dependences
> 	and setup LOPT variable when building the executable target.
> 
> Modified:
>     stdcxx/trunk/etc/config/GNUmakefile.cfg
> 
> Modified: stdcxx/trunk/etc/config/GNUmakefile.cfg
> URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/GNUmakefile.cfg?rev=627618&r1=627617&r2=627618&view=diff
> ==============================================================================
> --- stdcxx/trunk/etc/config/GNUmakefile.cfg (original)
> +++ stdcxx/trunk/etc/config/GNUmakefile.cfg Wed Feb 13 16:09:02 2008
> @@ -363,13 +363,17 @@
>                       -e "s/_RWSTD_NO_//g" -e "s/_RWSTD_//g"` ;         \
>            for sym in $$dep ; do                                        \
>                fname=$$sym ;                                            \
> -              [ ! -r $(SRCDIR)/$$fname.cpp ] && fname="NO_$$fname" ;   \
> +              src=$(SRCDIR)/$$fname.cpp;                               \
> +              [ ! -r $$src ] && fname="NO_$$fname" ;                   \
>                grep "_RWSTD_NO_$$sym$$" config.h >/dev/null ;           \
>                if [ $$? -ne 0 ] ; then                                  \
> -                  grep "[^a-zA-Z0-9_]*main *(" $(SRCDIR)/$$fname.cpp   \
> -                       >/dev/null 2>&1 ;                               \
> +                  grep "[^a-zA-Z0-9_]*main *(" $$src >/dev/null 2>&1 ; \
>                    if [ $$? -eq 0 ] ; then                              \
> -                      targets="$$fname.o $$fname run RUN=$$fname" ;    \
> +                      opts=`sed -n                                     \
> +                            "s/^[^A-Z_a-z0-9]*LDOPTS *= *\(.*\)/\1/p"  \
> +                            $$src`;                                    \
> +                      targets="$$fname.o $$fname run RUN=$$fname"      \
> +                              "$(LOPT)=$$opts" ;                       \
>                    elif [ `echo $$fname | grep "\.lib"` ] ; then        \
>                        targets="$$fname$(LIBSUFFIX) $(LOPT)=" ;         \
>                    else                                                 \
> 
> 
> 


Re: svn commit: r627618 - /stdcxx/trunk/etc/config/GNUmakefile.cfg

Posted by Martin Sebor <se...@roguewave.com>.
Thanks for creating the issue (STDCXX-737)! I think I've figured out
the problem with the original patch. Please check to make sure things
work as you expect with the change I'm suggesting in my comment on
the issue and if you're happy with it go ahead and commit the new
patch.

Martin

Farid Zaripov wrote:
>> -----Original Message-----
>> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor
>> Sent: Wednesday, February 20, 2008 1:54 AM
>> To: dev@stdcxx.apache.org
>> Subject: Re: svn commit: r627618 - 
>> /stdcxx/trunk/etc/config/GNUmakefile.cfg
>>
>> Hi Farid,
>>
>> This change seems to have broken the config test dependency 
>> detection logic and caused the EDG eccp build regression 
>> described in STDCXX-733.
>> I assigned the issue to you but just in case you miss it 
>> among all the other traffic on issues@s.a.o... Can you please 
>> take a look into it whenever you have chance?
>>
>>      http://issues.apache.org/jira/browse/STDCXX-733
>>
>> Incidentally, out of curiosity, what is this change supposed to do?
> 
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> 
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> 
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> 
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
> 
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule.
> 
> Farid.
> 


RE: svn commit: r627618 - /stdcxx/trunk/etc/config/GNUmakefile.cfg

Posted by Farid Zaripov <Fa...@epam.com>.
> -----Original Message-----
> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor
> Sent: Wednesday, February 20, 2008 1:54 AM
> To: dev@stdcxx.apache.org
> Subject: Re: svn commit: r627618 - 
> /stdcxx/trunk/etc/config/GNUmakefile.cfg
> 
> Hi Farid,
> 
> This change seems to have broken the config test dependency 
> detection logic and caused the EDG eccp build regression 
> described in STDCXX-733.
> I assigned the issue to you but just in case you miss it 
> among all the other traffic on issues@s.a.o... Can you please 
> take a look into it whenever you have chance?
> 
>      http://issues.apache.org/jira/browse/STDCXX-733
> 
> Incidentally, out of curiosity, what is this change supposed to do?

  I made this change in GNUmakefile because the
EXTERN_FUNCTION_TEMPLATE.cpp
config test has compiled twice on my gcc/Linux:

1) first it was not linked with extern_function_template_imp.o and due
to this
the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h

config.log:
---------
...
gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
-Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
-Wcast-align  -c
/usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
extern_function_template_imp.o
gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
-Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
-Wcast-align  -c
/usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
EXTERN_FUNCTION_TEMPLATE.o
gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
EXTERN_FUNCTION_TEMPLATE
EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
/usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
reference to `S<int> foobar<int>(S<int>)'
collect2: ld returned 1 exit status
...
---------

config.h:
---------
...
// #define _RWSTD_NO_extern_function_template_imp
#define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
...
---------

2) second it was linked with extern_function_template_imp.o and the
config.h contains the second entry, where
_RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented

config.log:
---------
...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
-Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
-Wcast-align  -c
/usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
EXTERN_FUNCTION_TEMPLATE.o
gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
-lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
./EXTERN_FUNCTION_TEMPLATE
...
---------

config.h:
---------
...
// #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
...
---------

  As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
while gcc supports the extern function templates.

  The first compilation is come from "%.o: %.cpp" rule, and the second -
from "config:" rule.

Farid.