Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 248800 - net-analyzer/mtr-0.75 -Wno-pointer-sign option
Summary: net-analyzer/mtr-0.75 -Wno-pointer-sign option
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-25 17:31 UTC by barthek
Modified: 2009-10-22 09:24 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mtr-0.75--Wno-pointer-sign.patch (mtr-0.75--Wno-pointer-sign.patch,752 bytes, patch)
2009-05-24 22:47 UTC, Peter Volkov (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description barthek 2008-11-25 17:31:03 UTC
hi,

newest build of mtr cannot be compiled with gcc-3.4.6 (current version on hardened). it does not know -Wno-pointer-sign option.

if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=pentium2 -O3 -pipe -Wall -Wno-pointer-sign -MT mtr.o -MD -MP -MF ".deps/mtr.Tpo" -c -o mtr.o mtr.c; \
        then mv -f ".deps/mtr.Tpo" ".deps/mtr.Po"; else rm -f ".deps/mtr.Tpo"; exit 1; fi
cc1: error: unrecognized command line option "-Wno-pointer-sign"
make[2]: *** [mtr.o] Error 1

fix: new ebuild
Comment 1 kfm 2008-11-26 20:45:40 UTC
This can be fixed with a simple configure patch such as:

 { echo "$as_me:$LINENO: checking for C flags to get more warnings" >&5
 echo $ECHO_N "checking for C flags to get more warnings... $ECHO_C" >&6; }
 ac_save_CFLAGS="$CFLAGS"
 if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
-    warning_CFLAGS="-Wall -Wno-pointer-sign"
+    if test "`gcc -dumpversion`" = "3.4.6" ; then
+        warning_CFLAGS="-Wall"
+    else
+        warning_CFLAGS="-Wall -Wno-pointer-sign"
+    fi;
 else
     case "$host_os" in
         irix*)tes

In that path, it's already been determined that a GNU toolchain is in use, so presumably calling gcc -dumpversion is OK. It's flawed though because it should really detect any version of GNU GCC lower than that which introduced the (no)-pointer-sign warning option and not set it on that basis. Unfortunately, while I can think of a number of ways to do that, I don't know autotools well enough to propose a method that is well suited to a configure script.
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2009-05-24 22:47:48 UTC
Created attachment 192346 [details, diff]
mtr-0.75--Wno-pointer-sign.patch

Thank you for report, barthek.  I have bad memory so I'll attach patch for this issue here. I've reported it upstream and I want to give them some time to answer before I push this patch to the tree.
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2009-10-22 09:24:32 UTC
Ok, upstream ack'ed patch. commited. Thank you for report.