LINUX.ORG.RU

Компеляция языка ADA


0

0

Исходник:
with Text_IO;
procedure Main is
begin
Text_IO.Put_Line ("Hello World");
end Main;
Компеляция:
gcc -c adatest.adb
Ответ:
+===========================GNAT BUG DETECTED==============================+
| 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) (i386-redhat-linux-gnu) |
| Storage_Error stack overflow (or erroneous memory access) |
| Error detected at a-textio.ads:53:9 |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html. |
| Include the entire contents of this bug box in the report. |
| Include the exact gcc or gnatmake command that you entered. |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files). |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

adatest.adb

adatest.adb:3:11: warning: file name does not match unit name, should be "main.adb"
compilation abandoned

ВОПРОС Что не так ???????
ps: ADA_INCLUDE_PATH и ADA_OBJECTS_PATH установленны. Дистр FC3

★★

Ответ на: комментарий от Begemoth

Видимо в Вашем, ибо http://www.redhat.com/archives/rhl-list/2006-April/msg06029.html
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=187853
hen it is a kernel bug, it doesn't honor PT_GNU_STACK any longer.
Try:
void
__attribute__((noinline))
bar (void (*fn) (void))
{
fn ();
}

int
main (void)
{
int i = 1;
void foo (void)
{
i--;
}
bar (foo);
return i;
}

Compile with gcc -g -o /tmp/test /tmp/test.c
sudo chcon system_u:object_r:java_exec_t /tmp/test # To rule SELinux out
/tmp/test
Clearly, the stack is not executable:
7fffffc96000-7fffffcac000 rw-p 7fffffc96000 00:00 0 [stack]


anonymous
()
Ответ на: комментарий от anonymous

Госпадину к сожелению anonymous БОЛЬШОЕ СПАСИБО !!!!!!

alexsy ★★
() автор топика

вот мой Makefile:

=====================
MAIN    = test

SLIST   = test.adb

IMP_OBS = test_esd.o

CLFLAGS = -lesd


all:    $(MAIN)


$(MAIN):        $(IMP_OBS) $(SLIST)
        gnatmake $@ -bargs -static -largs $(CLFLAGS)

clean:
        rm -rf $(MAIN) core *.o *.ali
=====================

короче, я использую gnatmake, он все за меня делает

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.