This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 64bit] Fix speclib for x86_64


On Sun, Feb 17, 2013 at 04:46:22AM -0600, Yaakov wrote:

>2013-02-16  Yaakov Selkowitz  <yselkowitz@...>
>
>	* Makefile.in (libcygwin.a): Move --target flag from here...
>	(toolopts): to here, to be used by both mkimport and speclib.
>	* speclib: Omit leading underscore in symbol names on x86_64.
>
>Index: Makefile.in
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/Makefile.in,v
>retrieving revision 1.257.2.14
>diff -u -p -r1.257.2.14 Makefile.in
>--- Makefile.in	15 Feb 2013 13:36:35 -0000	1.257.2.14
>+++ Makefile.in	17 Feb 2013 05:15:10 -0000
>@@ -123,7 +123,7 @@ LIBGMON_A:=libgmon.a
> CYGWIN_START:=crt0.o
> GMON_START:=gcrt0.o
> 
>-toolopts:=--ar=${AR} --as=${AS} --nm=${NM} --objcopy=${OBJCOPY} 
>+toolopts:=--target=${target_alias} --ar=${AR} --as=${AS} --nm=${NM} --objcopy=${OBJCOPY}
> speclib=\
>     ${srcdir}/speclib ${toolopts} \
> 	--exclude='cygwin' \
>@@ -434,7 +434,7 @@ $(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg 
> 
> # Rule to build libcygwin.a
> $(LIB_NAME): $(LIBCOS) | $(TEST_DLL_NAME) 
>-	${srcdir}/mkimport --target=$(target_alias) ${toolopts} ${NEW_FUNCTIONS} $@ cygdll.a $^
>+	${srcdir}/mkimport ${toolopts} ${NEW_FUNCTIONS} $@ cygdll.a $^
> 
> ${STATIC_LIB_NAME}: mkstatic ${TEST_DLL_NAME}
> 	perl -d $< -x ${EXCLUDE_STATIC_OFILES} --library=${LIBC} --library=${LIBM} --ar=${AR} $@ cygwin.map
>Index: speclib
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/speclib,v
>retrieving revision 1.25
>diff -u -p -r1.25 speclib
>--- speclib	11 Feb 2011 18:00:55 -0000	1.25
>+++ speclib	17 Feb 2013 05:15:10 -0000
>@@ -11,16 +11,17 @@ my $static;
> my $inverse;
> my @exclude;
> 
>-my ($ar, $as, $nm, $objcopy);
>+my ($target, $ar, $as, $nm, $objcopy);
> GetOptions('exclude=s'=>\@exclude, 'static!'=>\$static, 'v!'=>\$inverse,
>-	   'ar=s'=>\$ar, 'as=s'=>\$as,'nm=s'=>\$nm, 'objcopy=s'=>\$objcopy);
>+	   'target=s'=>\$target, 'ar=s'=>\$ar, 'as=s'=>\$as,'nm=s'=>\$nm, 'objcopy=s'=>\$objcopy);
> 
> $_ = File::Spec->rel2abs($_) for @ARGV;
> 
> my $libdll = shift;
> my $lib =  pop;
>+my $uscore = ($target =~ /^x86_64\-/ ? undef : '_');

There is no reason to quote the dash here.  But, I would actually prefer
a substr check since that is a little faster.

my $uscore = (substr($target, 0, 7) eq 'x86_64-') ? ...

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]