Bug 174568 - [MAINTAINER] devel/gdb: Improve build with clang
Summary: [MAINTAINER] devel/gdb: Improve build with clang
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: Rene Ladan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-19 09:00 UTC by luca.pizzamiglio
Modified: 2012-12-24 22:30 UTC (History)
0 users

See Also:


Attachments
file.diff (5.74 KB, patch)
2012-12-19 09:00 UTC, luca.pizzamiglio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description luca.pizzamiglio 2012-12-19 09:00:00 UTC
This update improve the clang support, resolving warnings (considered error with -Werror) directly in the source code.
Now, clang detection is not needed anymore

Fix: Patch attached with submission follows:
Comment 1 Rene Ladan freebsd_committer freebsd_triage 2012-12-24 21:24:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rene

Take
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-12-24 22:26:59 UTC
Author: rene
Date: Mon Dec 24 22:26:50 2012
New Revision: 309466
URL: http://svnweb.freebsd.org/changeset/ports/309466

Log:
  Improve/fix build with clang.
  
  PR:		ports/174568
  Submitted by:	maintainer

Added:
  head/devel/gdb/files/patch-bfd-coffcode.h   (contents, props changed)
  head/devel/gdb/files/patch-bfd-opncls.c   (contents, props changed)
  head/devel/gdb/files/patch-bfd-peicode.h   (contents, props changed)
  head/devel/gdb/files/patch-opcodes-i386-dis.c   (contents, props changed)
Deleted:
  head/devel/gdb/files/patch-bfd-configure
  head/devel/gdb/files/patch-opcodes-configure

Added: head/devel/gdb/files/patch-bfd-coffcode.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdb/files/patch-bfd-coffcode.h	Mon Dec 24 22:26:50 2012	(r309466)
@@ -0,0 +1,11 @@
+--- bfd/coffcode.h.orig	2012-12-18 14:22:56.000000000 +0100
++++ bfd/coffcode.h	2012-12-18 14:23:11.000000000 +0100
+@@ -3442,7 +3442,7 @@
+ 	 incremented in coff_set_section_contents.  This is right for
+ 	 SVR3.2.  */
+       if (strcmp (current->name, _LIB) == 0)
+-	bfd_set_section_vma (abfd, current, 0);
++	(void)bfd_set_section_vma (abfd, current, 0);
+ #endif
+ 
+ #ifdef ALIGN_SECTIONS_IN_FILE

Added: head/devel/gdb/files/patch-bfd-opncls.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdb/files/patch-bfd-opncls.c	Mon Dec 24 22:26:50 2012	(r309466)
@@ -0,0 +1,11 @@
+--- bfd/opncls.c.orig	2012-12-18 14:18:47.000000000 +0100
++++ bfd/opncls.c	2012-12-18 14:19:18.000000000 +0100
+@@ -254,7 +254,7 @@
+      then it may have been opened with special flags that make it
+      unsafe to close and reopen the file.  */
+   if (fd == -1)
+-    bfd_set_cacheable (nbfd, TRUE);
++    (void)bfd_set_cacheable (nbfd, TRUE);
+ 
+   return nbfd;
+ }

Added: head/devel/gdb/files/patch-bfd-peicode.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdb/files/patch-bfd-peicode.h	Mon Dec 24 22:26:50 2012	(r309466)
@@ -0,0 +1,11 @@
+--- bfd/peicode.h.orig	2012-12-18 14:22:02.000000000 +0100
++++ bfd/peicode.h	2012-12-18 14:22:21.000000000 +0100
+@@ -602,7 +602,7 @@
+ 
+   bfd_set_section_flags (vars->abfd, sec, flags | extra_flags);
+ 
+-  bfd_set_section_alignment (vars->abfd, sec, 2);
++  (void)bfd_set_section_alignment (vars->abfd, sec, 2);
+ 
+   /* Check that we will not run out of space.  */
+   BFD_ASSERT (vars->data + size < vars->bim->buffer + vars->bim->size);

Added: head/devel/gdb/files/patch-opcodes-i386-dis.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdb/files/patch-opcodes-i386-dis.c	Mon Dec 24 22:26:50 2012	(r309466)
@@ -0,0 +1,58 @@
+--- opcodes/i386-dis.c.orig	2012-07-16 14:58:29.000000000 +0200
++++ opcodes/i386-dis.c	2012-12-18 15:22:10.000000000 +0100
+@@ -11991,7 +11991,7 @@
+ static void
+ OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
+ {
+-  oappend ("%st" + intel_syntax);
++  oappend (&"%st"[(short)intel_syntax]);
+ }
+ 
+ static void
+@@ -12520,32 +12520,32 @@
+   if (prefixes & PREFIX_CS)
+     {
+       used_prefixes |= PREFIX_CS;
+-      oappend ("%cs:" + intel_syntax);
++      oappend (&"%cs:"[(short)intel_syntax]);
+     }
+   if (prefixes & PREFIX_DS)
+     {
+       used_prefixes |= PREFIX_DS;
+-      oappend ("%ds:" + intel_syntax);
++      oappend (&"%ds:"[(short)intel_syntax]);
+     }
+   if (prefixes & PREFIX_SS)
+     {
+       used_prefixes |= PREFIX_SS;
+-      oappend ("%ss:" + intel_syntax);
++      oappend (&"%ss:"[(short)intel_syntax]);
+     }
+   if (prefixes & PREFIX_ES)
+     {
+       used_prefixes |= PREFIX_ES;
+-      oappend ("%es:" + intel_syntax);
++      oappend (&"%es:"[(short)intel_syntax]);
+     }
+   if (prefixes & PREFIX_FS)
+     {
+       used_prefixes |= PREFIX_FS;
+-      oappend ("%fs:" + intel_syntax);
++      oappend (&"%fs:"[(short)intel_syntax]);
+     }
+   if (prefixes & PREFIX_GS)
+     {
+       used_prefixes |= PREFIX_GS;
+-      oappend ("%gs:" + intel_syntax);
++      oappend (&"%gs:"[(short)intel_syntax]);
+     }
+ }
+ 
+@@ -13876,7 +13876,7 @@
+ 	  intel_operand_size (b_mode, sizeflag);
+ 	}
+     }
+-  oappend ("%es:" + intel_syntax);
++  oappend (&"%es:"[(short)intel_syntax]);
+   ptr_reg (code, sizeflag);
+ }
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2012-12-24 22:27:07 UTC
State Changed
From-To: open->closed

Committed, thanks