Sender: richdawe AT bigfoot DOT com Message-ID: <3A158878.2C59BE68@bigfoot.com> Date: Fri, 17 Nov 2000 19:35:20 +0000 From: Richard Dawe X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.17 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: Help: Isn't libdbg the debugging version of libc? References: <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001116230739 DOT 00a55af0 AT pop5 DOT banet DOT net> <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001116230739 DOT 00a55af0 AT pop5 DOT banet DOT net> <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001117121959 DOT 03459ad0 AT pop5 DOT banet DOT net> Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms1F46583A1E14A007155C24CE" Reply-To: djgpp-workers AT delorie DOT com This is a cryptographically signed message in MIME format. --------------ms1F46583A1E14A007155C24CE Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello. "Peter J. Farley III" wrote: [snip] > Collected errors/warnings during full libc build: [snip] > gcc ... -c dbgcom.c > dbgcom.c:25: warning: `id' defined but not used > o:/tmp\ccirTSlS.s: Assembler messages: > o:/tmp\ccirTSlS.s:530: Warning: Indirect lcall without `*' > o:/tmp\ccirTSlS.s:559: Warning: Indirect ljmp without `*' I got bitten by the lcall problem with libsocket. I've enclosed below the 'binutils' (well, 'as') version detection I used in libsocket's config Makefile. Some comment lines have wrapped. [Start Makefile extract] # # Binutils detection - as (the assembler) from binutils 2.8.1 and 2.9.5.1 beta # handle the lcall mnemonic slightly differently. The assembly has # #ifdef/#else/#endif to ensure that it compiles without warnings. # # OK, this is a bit ugly, but we have no choice. Unfortunately, it means sed # is required to build libsocket. # GAS_VERSION := $(shell $(AS) --version | sed -n 's/^GNU assembler //p') GAS_MAJOR := \ $(shell echo $(GAS_VERSION) \ | sed -n 's/^\([0-9][0-9]*\).*/\1/p') GAS_MINOR := \ $(shell echo $(GAS_VERSION) \ | sed -n 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p') GAS_MINORMINOR := \ $(shell echo $(GAS_VERSION) \ | sed -n 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p') # Defaults for version numbers ifeq ($(GAS_MAJOR),) GAS_MAJOR := 0 endif ifeq ($(GAS_MINOR),) GAS_MINOR := 0 endif ifeq ($(GAS_MINORMINOR),) GAS_MINORMINOR := 0 endif # Pass defines as compiler switches CFLAGS += -DGAS_MAJOR=$(GAS_MAJOR) CFLAGS += -DGAS_MINOR=$(GAS_MINOR) CFLAGS += -DGAS_MINORMINOR=$(GAS_MINORMINOR) [End Makefile extract] You can then do conditionals in your assembly, e.g. __asm__ __volatile__ ( #if (GAS_MAJOR == 2) \ && ((GAS_MINOR < 9) || ((GAS_MINOR == 9) && (GAS_MINORMINOR < 5))) " lcall _csock_entry \n\ " #else " lcall *_csock_entry \n\ " #endif " jc 1f \n\ xorl %%eax, %%eax \n\ 1:" : "=a" (ret), "=b" (dest_port), "=c" (dest_addr) : "a" (12), "D" (csock->fd), "d" (i) : "cc"); This is not very pretty, but I could not find any way of making the code compiled without any warnings/errors with binutils 2.8.1 and 2.95.2 from the same sources. I'm not suggesting this be incorporated into the DJGPP build, since it would add a dependency on sed, but it's a solution nonetheless. Bye, Rich =] -- Richard Dawe [ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ] --------------ms1F46583A1E14A007155C24CE Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIHFQYJKoZIhvcNAQcCoIIHBjCCBwICAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC BY0wggLMMIICNaADAgECAhB2D2twnX9wqhegGKLtJkJmMA0GCSqGSIb3DQEBBAUAMFgxJzAl BgNVBAoTHkJya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