Skip to contentSkip to conversation

configure: put gprof config in host config file

PATCH In review Sergey Fedorov 2 participants 3 messages Jun 19, 2014 – Jun 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: put gprof config in host config file

The only use for GPROF_CFLAGS is in main makefile, but this variable put only to taget config file which is not included to the main makefile. Lets put gprof config variables to host config file.

---
 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
configure +5 -1
index dfbe75e..e0433b9 100755
@@ -4323,6 +4323,10 @@ fi
 if test "$profiler" = "yes" ; then
   echo "CONFIG_PROFILER=y" >> $config_host_mak
 fi
+if test "$gprof" = "yes" ; then
+  echo "CONFIG_GPROF=y" >> $config_host_mak
+  echo "GPROF_CFLAGS=-p" >> $config_host_mak
+fi
 if test "$slirp" = "yes" ; then
   echo "CONFIG_SLIRP=y" >> $config_host_mak
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
@@ -5160,7 +5164,7 @@ alpha)
 esac
 
 if test "$gprof" = "yes" ; then
-  echo "TARGET_GPROF=yes" >> $config_target_mak
+  echo "TARGET_GPROF=y" >> $config_target_mak
   if test "$target_linux_user" = "yes" ; then
     cflags="-p $cflags"
     ldflags="-p $ldflags"
Signature · 1 line
1.9.1
#1 lore raw
Quoted 3 lines · Sergey Fedorov

The only use for GPROF_CFLAGS is in main makefile, but this variable put only to taget config file which is not included to the main makefile. Lets put gprof config variables to host config file.

I'm not sure I follow.

First of all, GPROF_CFLAGS is referenced in Makefile.objs, not the main makefile. And Makefile.objs _is_ included by the main Makefile.

Second, now you're including this variable into 2 places.

Maybe it is better to stop putting it to the target config file at the same time?

What problem you're trying to solve?

Maybe some more details will help?

Thanks,

/mjt

Quoted 31 lines
---
 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
configure +5 -1
index dfbe75e..e0433b9 100755
@@ -4323,6 +4323,10 @@ fi
 if test "$profiler" = "yes" ; then
   echo "CONFIG_PROFILER=y" >> $config_host_mak
 fi
+if test "$gprof" = "yes" ; then
+  echo "CONFIG_GPROF=y" >> $config_host_mak
+  echo "GPROF_CFLAGS=-p" >> $config_host_mak
+fi
 if test "$slirp" = "yes" ; then
   echo "CONFIG_SLIRP=y" >> $config_host_mak
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
@@ -5160,7 +5164,7 @@ alpha)
 esac
 
 if test "$gprof" = "yes" ; then
-  echo "TARGET_GPROF=yes" >> $config_target_mak
+  echo "TARGET_GPROF=y" >> $config_target_mak
   if test "$target_linux_user" = "yes" ; then
     cflags="-p $cflags"
     ldflags="-p $ldflags"
#2 lore raw
Quoted 9 lines · Michael Tokarev
Quoted 3 lines · Sergey Fedorov

The only use for GPROF_CFLAGS is in main makefile, but this variable put only to taget config file which is not included to the main makefile. Lets put gprof config variables to host config file.

I'm not sure I follow.

First of all, GPROF_CFLAGS is referenced in Makefile.objs, not the main makefile. And Makefile.objs _is_ included by the main Makefile.

Quoted 8 lines

Second, now you're including this variable into 2 places.

Maybe it is better to stop putting it to the target config file at the same time?

What problem you're trying to solve?

Maybe some more details will help?

I'm sorry. Seems the patch is based on v2.0.0, not current master. So this patch can be ignore.

// Sergey

Quoted 35 lines

Thanks,

/mjt

Quoted 30 lines
---
 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
configure +5 -1
index dfbe75e..e0433b9 100755
@@ -4323,6 +4323,10 @@ fi
 if test "$profiler" = "yes" ; then
   echo "CONFIG_PROFILER=y" >> $config_host_mak
 fi
+if test "$gprof" = "yes" ; then
+  echo "CONFIG_GPROF=y" >> $config_host_mak
+  echo "GPROF_CFLAGS=-p" >> $config_host_mak
+fi
 if test "$slirp" = "yes" ; then
   echo "CONFIG_SLIRP=y" >> $config_host_mak
   echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
@@ -5160,7 +5164,7 @@ alpha)
 esac
 
 if test "$gprof" = "yes" ; then
-  echo "TARGET_GPROF=yes" >> $config_target_mak
+  echo "TARGET_GPROF=y" >> $config_target_mak
   if test "$target_linux_user" = "yes" ; then
     cflags="-p $cflags"
     ldflags="-p $ldflags"