Hi,

 This is a regression caused by rev 3993.  Could a gatekeeper review this
patch? Thank you very much.


For a small case below, it will got link failure:

> cat 1.c

extern void foo(int a);

int main()

{

  foo(5);

}


>cat 2.c

void foo(int a)

{

  printf("a = %d\n", a);

}


>opencc -ipa 1.c 2.c

/home/zxj/open64/bits/lib/gcc-lib/x86_64-open64-linux/5.0/ipa_link: symbol
lookup error:
/home/zxj/open64/bits/lib/gcc-lib/x86_64-open64-linux/5.0/ipa.so: undefined
symbol: _Z15DST_get_dirnamet

openCC INTERNAL ERROR:
/home/zxj/open64/bits/lib/gcc-lib/x86_64-open64-linux/5.0/ipa_link
returned non-zero status 127


In osprey/common/com/dwarf_DST_producer.cxx: the function DST_get_dirname
is declared as “static char*”, However, I find in
osprey/be/com/clone_DST_utils.cxx, there is an “extern char*
DST_get_dirname”, a static function can’t be “extern”, and removing the
"static" is able to solve this problem.


Index: osprey/common/com/dwarf_DST_producer.cxx

===================================================================

--- osprey/common/com/dwarf_DST_producer.cxx    (revision 4000)

+++ osprey/common/com/dwarf_DST_producer.cxx    (working copy)

@@ -587,7 +587,7 @@

 }


 /* get the include directory name of a given ordinal */

-static char *

+char *

 DST_get_dirname(mUINT16 ordinal)

 {

     DST_DIR_IDX d_idx = DST_get_include_dirs();


Best regards,

xiao-jing
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to