Message-ID: <05f201c36426$24b2fa70$0600000a@broadpark.no> From: "Gisle Vanem" To: References: <3f3e2079$0$168$cc7c7865 AT news DOT luth DOT se> Subject: Re: as and structs Date: Sat, 16 Aug 2003 20:42:28 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Reply-To: djgpp AT delorie DOT com "Martin Str|mberg" said: > and in y.S: > #include "x.h" > > debug: .byte DEBUG > > world: .asciz "world\n" > > > .globl _print_world > _print_world: > testb $0xff, debug > jz .Lskip_print > > pushl $world > call _printf > addl $4, %esp ... > If I remove the prototype and struct in x.h it works fine. > > > Questions: > > 1. What should I do to make this work nicely with prototypes and > structs in header files? > > 2. Why is CFLAGS missing while compiling y.S You should assemble y.S via a cpp stage: %.o: %.S $(CC) -DASM -Wall -x assembler-with-cpp -o $@ -c $< and possibly surrounding things as doesn't understand with #ifndef ASM --gv