www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000046

When Created: 12/30/1995 14:59:07
Against DJGPP version: 2.00.beta3
By whom: iko@morla.crec.mipt.ru
Abstract: Cannot do '.align X' ,X!=2**n in asm files
When CC1 produces foo.s and there is a need to align code
at X bytes boundary, it outputs '.align Y' where Y=log2(X).
Everything is OK when assembler expands its input to 2**Y
(as LINUXish AS claims to do (?:)). So I try to compile GCC-2.6.3
with Intel's architecture enhancements with options '-mpentium -O2'
(some useful alignments are 4 (Y=2) and 8 (Y=3 :}) bytes).
But GAS included in DJGPP package says that alignment given
is not a power of 2 and stops. :(
PS: May be this is not a bug, still posting...

Workaround added: 12/30/1995 15:11:44
By whom: iko@morla.crec.mipt.ru
In the case of building GNU compiler there is a commented part of code
in file config/i386/gas.h which expands Y to 1<<Y in ASM_OUTPUT_ALIGN macro.
I have changed '#if 0' to '#if 1' in this file, and problem has gone.

NOTE: As this problem may be not a REAL problem,
      this may be NOT a REAL workaround :8)...

Note added: 12/30/1995 15:23:02
By whom: iko@morla.crec.mipt.ru
This problem appears under DJGPP-beta4 and not found under Linux.

Note added: 01/23/1996 21:57:52
By whom: dj@delorie.com
Linux is an a.out system by definition (in binutils).  DJGPP is COFF.
binutils treats COFF special; gcc does not.  Been broke ever since.

Fixed in version 2.00.beta5 on 01/25/1996 07:43:18
By whom: dj@delorie.com



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010