tenfourfox - should it be in the MacPorts repo?

Ken Cunningham ken.cunningham.webuse at gmail.com
Thu Oct 11 17:19:51 UTC 2018


On 2018-10-11, at 10:05 AM, Christopher Jones wrote:

> Hi,
> 
> Being ’niche’ in itself is no reason to not include something in MacPorts, so that shouldn’t be a concern. We have plenty of ‘niche’ ports already, which is partly what makes MacPorts better than the alternatives ;) 
> 
> If the new ports build ‘normally’ like any other, then why not have them in the main repo. There are plenty other ‘complicated’ port files out there, many way more complicated that tenfourfox (which actually is quite tame I would say ;))
> 
> That said, strip7 looks a little odd to me. The port file is very very similar to the cctools port file it was based on. Obvious questions are
> 
> - What exactly is the inconsistency you refer to ? If its a bug in the main strip then has it been submitted upstream ? If it hasn’t why not ?
> 
> - Could the patch applied to strip7 not just be applied to the main cctools build (for the platforms that need it) or is there some reason the original strip is also needed ? Is strip7 not a drop in replacement for strip ?
> 
> - If there really is a need for a separate strip7 port, I think you could massively reduce duplication in the portilfes by instead making it a sub-port of cctools.
> 
> cheers Chris

Thanks for looking.

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 ... 

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 ;>

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;

========


More information about the macports-dev mailing list