On Fri, 2009-02-20 at 15:58 -0300, Higor Aparecido Vieira Alves wrote:
> Hi Team, 
> 
> Runcc function was compiling all tests with default compiler
> architecture (32bits on RHEL and 64bits on SLES).
> 
> This patch fix this problem adding support to get CFLAGS envar and use
> it to compile lib6 test for different architectures (32bits and
> 64bits). 

Thanks.

Regards--
Subrata

> 
> --- ltp_cvs/testcases/network/lib6/runcc.c    2008-11-11 04:44:51.000000000
> -0200
> +++ ltp/testcases/network/lib6/runcc.c        2009-02-20 15:05:13.000000000
> -0300
> @@ -64,6 +64,7 @@
>  {
>       static char filename[1024];
>       int fd, es, saved_errno;
> +     char * cflags;
> 
>       fd = mkstemp(filename0);
>       if (fd < 0) {
> @@ -84,8 +85,14 @@
>               return -1;
>       }
>       (void) close(fd);
> -     snprintf(cmd, sizeof(cmd), "%s -o %s %s > /tmp/test 2>&1", "cc",
> -             filename0, filename);
> +
> +     cflags = getenv("CFLAGS");
> +     if (cflags == NULL){
> +             tst_resm(TWARN, "CFLAGS not found, using default cc arch.");
> +     }
> +
> +     snprintf(cmd, sizeof(cmd), "%s %s -o %s %s > /tmp/test 2>&1", "cc",
> +             cflags, filename0, filename);
>       es = system(cmd);
>       if (WEXITSTATUS(es) == 127) {
>               tst_resm(TBROK, "%s: can't run C compiler: \"%s\"", cmd);
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________ Ltp-list mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to