Bug 156881 - devel/valgrind: Fix build with newer gcc
Summary: devel/valgrind: Fix build with newer gcc
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Michael Scheidell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-08 12:00 UTC by lichray
Modified: 2011-12-03 19:30 UTC (History)
0 users

See Also:


Attachments
patch-include_vki_vki-x86-freebsd.h (634 bytes, text/plain)
2011-05-08 12:00 UTC, lichray
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description lichray 2011-05-08 12:00:17 UTC
	
	The bare __aligned attribute no longer exists in new gcc (like gcc46 on my system). The following patch replaces it with the standard __attribute__.
Comment 1 Edwin Groothuis freebsd_committer 2011-05-08 12:00:28 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stas

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Thomas Abthorpe freebsd_committer 2011-11-05 04:12:41 UTC
Responsible Changed
From-To: stas->freebsd-ports-bugs

- back to the heap
Comment 3 Michael Scheidell freebsd_committer 2011-12-02 22:31:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->scheidell

ill take a look at it
Comment 4 Michael Scheidell freebsd_committer 2011-12-02 23:20:11 UTC
State Changed
From-To: open->feedback

i just tried this on valgrind 3.6.1_2,1, and FreeBSD 7.4, 8.2 and 9.0RC2 and it compiled just fine. 
(they seem to have older gcc installed by default) 
Could you clarify? 
did you install gcc46 from ports? 
could you come up with a patch/.ifdef/ test for newer version so that 
this does not interfeer with stock/standard included gcc? 
or, are you thinking that this patch will be upward compatible with older gcc?
Comment 5 lichray 2011-12-03 00:37:27 UTC
No, it still does not build.

In file included from ../include/vki/vki-freebsd.h:203:0,
                 from ../include/pub_tool_vki.h:51,
                 from mc_leakcheck.c:32:
../include/vki/vki-x86-freebsd.h:148:30: error: expected ':', ',',
';', '}' or '__attribute__' before '__aligned'
../include/vki/vki-x86-freebsd.h:218:30: error: expected ':', ',',
';', '}' or '__attribute__' before '__aligned'
gmake[3]: *** [memcheck_x86_freebsd-mc_leakcheck.o] Error 1

At least, the new attribute is supported >= gcc-4.2, which is the
stock compiler.

-- 
Zhihao Yuan, nickname lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/
Comment 6 Michael Scheidell freebsd_committer 2011-12-03 19:27:30 UTC
State Changed
From-To: feedback->closed

Committed, thanks
Comment 7 dfilter service freebsd_committer 2011-12-03 19:27:30 UTC
scheidell    2011-12-03 19:27:22 UTC

  FreeBSD ports repository

  Modified files:
    devel/valgrind       Makefile 
  Added files:
    devel/valgrind/files patch-include_vki_vki-x86-freebsd.h 
  Log:
  -The base __aligned attribute no longer exists in gcc46+
  -patch uses __attribute__ which is upward compatible with gcc42+
  
  PR:             ports/156881
  Submitted by:   Zhihao Yuan <lichray@gmail.com>
  Approved by:    maintainer(timeout), gaboe(mentor)
  Feature safe:   yes
  
  Revision  Changes    Path
  1.52      +2 -6      ports/devel/valgrind/Makefile
  1.1       +20 -0     ports/devel/valgrind/files/patch-include_vki_vki-x86-freebsd.h (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"