Bug 179041 - devel/arm-elf-binutils - fix a build problem with clang
Summary: devel/arm-elf-binutils - fix a build problem 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: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 06:10 UTC by Danilo Egêa Gondolfo
Modified: 2013-06-06 01:10 UTC (History)
0 users

See Also:


Attachments
file.diff (541 bytes, patch)
2013-05-28 06:10 UTC, Danilo Egêa Gondolfo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Danilo Egêa Gondolfo 2013-05-28 06:10:00 UTC
Avoiding the build problem pointed by http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.10-exp.20130522091700.pointyhat-west/arm-elf-binutils-2.23.2.log

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2013-05-28 06:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bdrewery

bdrewery@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Bryan Drewery freebsd_committer 2013-05-31 13:14:16 UTC
Instead of ignoring the warnings, it would be better to write patches to
fix the warnings and send upstream, or find upstream fixes. There's no
WWW in pkg-descr, I'm not sure where this port comes from. Do you know?
Comment 3 Danilo Egêa Gondolfo 2013-06-05 05:30:12 UTC
I think they had good reasons to write this code.
For example, the warning:

plugin.c:436:8: error: explicitly assigning a variable of type 'struct 
ld_plugin_input_file *' to itself [-Werror,-Wself-assign]
   file = file;

On GCC, assign a function parameter to itself avoids the warning 
"warning: unused parameter 'file'". But the clang is generating another 
warning.

I think there is no problem with the "--disable-werror" in this case and 
the others warnings too.

What do you think?

About the WWW, I'll fix it.
Comment 4 Bryan Drewery freebsd_committer 2013-06-06 01:01:24 UTC
On 6/4/2013 11:30 PM, Danilo Egea wrote:
> I think they had good reasons to write this code.
> For example, the warning:
> 
> plugin.c:436:8: error: explicitly assigning a variable of type 'struct
> ld_plugin_input_file *' to itself [-Werror,-Wself-assign]
>   file = file;
> 
> On GCC, assign a function parameter to itself avoids the warning
> "warning: unused parameter 'file'". But the clang is generating another
> warning.
> 
> I think there is no problem with the "--disable-werror" in this case and
> the others warnings too.
> 
> What do you think?
> 
> About the WWW, I'll fix it.


I'll commit the --disable-werror for now to at least make it buildable
with clang. I still suggest contacting upstream and sending them patches
to make the code support both GCC and clang. They may already have
patches for this as well.

Just send another PR to update the WWW.

Thank you for your work on this.

-- 
Regards,
Bryan Drewery
Comment 5 Bryan Drewery freebsd_committer 2013-06-06 01:04:24 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 6 dfilter service freebsd_committer 2013-06-06 01:04:26 UTC
Author: bdrewery
Date: Thu Jun  6 00:04:19 2013
New Revision: 320038
URL: http://svnweb.freebsd.org/changeset/ports/320038

Log:
  - Disable -Werror for now to fix clang building.
    Discussed with maintainer a more proper solution and
    to contact upstream. This at least allows clang to
    build for now.
  
  PR:		ports/179041
  Submitted by:	Danilo Egea Gondolfo <danilogondolfo@gmail.com> (maintainer)

Modified:
  head/devel/arm-elf-binutils/Makefile

Modified: head/devel/arm-elf-binutils/Makefile
==============================================================================
--- head/devel/arm-elf-binutils/Makefile	Wed Jun  5 22:40:22 2013	(r320037)
+++ head/devel/arm-elf-binutils/Makefile	Thu Jun  6 00:04:19 2013	(r320038)
@@ -15,7 +15,7 @@ USE_BZIP2=	yes
 USE_GMAKE=	yes
 USES=		gettext
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--target=${PKGNAMEPREFIX:S/-$//} CFLAGS="-I/usr/local/include"
+CONFIGURE_ARGS=	--target=${PKGNAMEPREFIX:S/-$//} --disable-werror CFLAGS="-I/usr/local/include"
 INFO_PATH=	${PKGNAMEPREFIX:S/-$//}/info
 MAN1=		${PKGNAMEPREFIX}addr2line.1 ${PKGNAMEPREFIX}as.1 \
 		${PKGNAMEPREFIX}ar.1 ${PKGNAMEPREFIX}c++filt.1 \
_______________________________________________
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"