tenfourfox - should it be in the MacPorts repo?

Christopher Jones jonesc at hep.phy.cam.ac.uk
Thu Oct 11 17:29:21 UTC 2018


Hi,

> Apparently, gcc48 can produce some zero-length N_SECTs that error out in the default strip command but don't need to. Cameron made them warnings instead (see below). We are reaching the limits of my knowledge about this issue right about now … 

OK. Looking at that patch, because all it does is make what was an error into a warning, I see no (technical) reason why this could not just be applied (conditionally, only on those old systems that need tenfoxfox)  to the main cctools build, so patch the strip command built by that. 

> 
> I made strip7 a separate port from cctools so as to stay out of Jeremy's way. It could easily be a subport of cctools, but I have a feeling Jeremy may not like that much ;>

You will not know without asking, and anyway cctools is open maintainer as well….

I think you should consider preparing a PR that does the above, and then let the discussion start on the PR itself. If/When that gets approved, adding the tenfourfox port should be straight forward..

cheers Chris

> 
> Ken
> 
> 
> 
> ==
> 
> --- misc/strip.c.orig	2018-09-16 17:48:10.000000000 -0700
> +++ misc/strip.c	2018-09-16 17:52:04.000000000 -0700
> @@ -2951,11 +2951,15 @@
> 		n_type = symbols[i].n_type;
> 		n_sect = symbols[i].n_sect;
> 		if((n_type & N_TYPE) == N_SECT){
> -		    if(n_sect == 0 || n_sect > nsects){
> +		    if(n_sect > nsects){
> 			error_arch(arch, member, "bad n_sect for symbol "
> 				   "table entry %d in: ", i);
> 			return(FALSE);
> 		    }
> +		    if (n_sect == 0) {
> +			warning_arch(arch, member, "ignoring n_sect == 0 for "
> +				"symbol table entry %d in: ", i);
> +		    }
> 		    s_flags = sections[n_sect - 1]->flags;
> 		}
> 		n_desc = symbols[i].n_desc;
> @@ -2967,11 +2971,15 @@
> 		n_type = symbols64[i].n_type;
> 		n_sect = symbols64[i].n_sect;
> 		if((n_type & N_TYPE) == N_SECT){
> -		    if(n_sect == 0 || n_sect > nsects){
> +		    if(n_sect > nsects){
> 			error_arch(arch, member, "bad n_sect for symbol "
> 				   "table entry %d in: ", i);
> 			return(FALSE);
> 		    }
> +		    if (n_sect == 0) {
> +			warning_arch(arch, member, "ignoring n_sect == 0 for "
> +				"symbol table entry %d in: ", i);
> +		    }
> 		    s_flags = sections64[n_sect - 1]->flags;
> 		}
> 		n_desc = symbols64[i].n_desc;
> 
> ========

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20181011/3ad2bf3f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1930 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20181011/3ad2bf3f/attachment-0001.bin>


More information about the macports-dev mailing list