olikraus / m2tklib

Automatically exported from code.google.com/p/m2tklib
Other
49 stars 11 forks source link

Makefile compilation on OS X (LLVM-Clang, SDL) #142

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. running `make` in ./sdl

What is the expected output? What do you see instead?
Attached is the output from running the above.

What version of the product are you using? On what operating system?
hg clone of repository on this date. OS X 10.9, SDL installed and tested 
working via brew.

Please provide any additional information below.

Trying to build on OS X 10.9 with built in developer tools:

gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

sdl-config --version
1.2.15

Original issue reported on code.google.com by lucas.be...@gmail.com on 22 Sep 2014 at 11:56

GoogleCodeExporter commented 9 years ago
/P/m/sdl> make
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2eh2bd.o ../src/m2eh2bd.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2eh2bs.o ../src/m2eh2bs.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2eh4bs.o ../src/m2eh4bs.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2eh6bs.o ../src/m2eh6bs.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2.o ../src/m2.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2obj.o ../src/m2obj.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2key.o ../src/m2key.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2msg.o ../src/m2msg.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2gfx.o ../src/m2gfx.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ghdummy.o ../src/m2ghdummy.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2usrnext.o ../src/m2usrnext.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2usrprev.o ../src/m2usrprev.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2usrupdn.o ../src/m2usrupdn.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2align.o ../src/m2align.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navutl.o ../src/m2navutl.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navinit.o ../src/m2navinit.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navroot.o ../src/m2navroot.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navupdn.o ../src/m2navupdn.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navnext.o ../src/m2navnext.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navprev.o ../src/m2navprev.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navlast.o ../src/m2navlast.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navfirst.o ../src/m2navfirst.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navdataup.o ../src/m2navdataup.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2navdatadn.o ../src/m2navdatadn.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2opt.o ../src/m2opt.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellistbase.o ../src/m2ellistbase.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellistcalc.o ../src/m2ellistcalc.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellistv.o ../src/m2ellistv.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellisth.o ../src/m2ellisth.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellistgrid.o ../src/m2ellistgrid.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellistxy.o ../src/m2ellistxy.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2fnarg.o ../src/m2fnarg.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elfnfmt.o ../src/m2elfnfmt.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elalign.o ../src/m2elalign.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elcombo.o ../src/m2elcombo.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elbutton.o ../src/m2elbutton.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elstrptr.o ../src/m2elstrptr.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elbuttonptr.o ../src/m2elbuttonptr.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellabelptr.o ../src/m2ellabelptr.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elstrlist.o ../src/m2elstrlist.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elslbase.o ../src/m2elslbase.c
../src/m2elslbase.c:225:3: warning: implicitly declaring library function 
'printf' with type 'int (const char *, ...)'
  printf("- slbase calc box: idx:%d pos:%d cx:%d cy:%d px:%d py:%d\n", idx, visible_pos, data->c.x, data->c.y, data->p.x, data->p.y);
  ^
../src/m2elslbase.c:225:3: note: please include the header <stdio.h> or 
explicitly provide a declaration for 'printf'
1 warning generated.
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elsb.o ../src/m2elsb.c
../src/m2elsb.c:70:2: warning: implicitly declaring library function 'printf' 
with type 'int (const char *, ...)'
        printf("sb w:%d h:%d arg:%d x:%d y:%d len:%d\n", width, height, 
        ^
../src/m2elsb.c:70:2: note: please include the header <stdio.h> or explicitly 
provide a declaration for 'printf'
1 warning generated.
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elroot.o ../src/m2elroot.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2null.o ../src/m2null.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elu8base.o ../src/m2elu8base.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elu8num.o ../src/m2elu8num.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elu8hs.o ../src/m2elu8hs.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellabel.o ../src/m2ellabel.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elstr.o ../src/m2elstr.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2eltext.o ../src/m2eltext.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elu32.o ../src/m2elu32.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elinfo.o ../src/m2elinfo.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elsetval.o ../src/m2elsetval.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2eltoggle.o ../src/m2eltoggle.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elradio.o ../src/m2elradio.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elsubutl.o ../src/m2elsubutl.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2draw.o ../src/m2draw.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2elstrup.o ../src/m2elstrup.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2gfxutl.o ../src/m2gfxutl.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2rom.o ../src/m2rom.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2utlu8d.o ../src/m2utlu8d.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2utlstrdat.o ../src/m2utlstrdat.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o ../src/m2ellabelfn.o ../src/m2ellabelfn.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o m2ghsdl.o m2ghsdl.c
cc -g -Wall  -I. `sdl-config --cflags` -std=gnu99 -I../src -DM2_USE_DBG_SHOW   
-c -o m2sdl.o m2sdl.c
m2sdl.c:62:38: warning: initializing 'void *' with an expression of type 'const 
m2_el_combo_t *' (aka 'const struct _m2_el_combo_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *li[] = { &t0, &t1,  &t2,  &t3, &yn_combo, &el_goto_top };
                                     ^~~~~~~~~
m2sdl.c:62:49: warning: initializing 'void *' with an expression of type 'const 
m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *li[] = { &t0, &t1,  &t2,  &t3, &yn_combo, &el_goto_top };
                                                ^~~~~~~~~~~~
m2sdl.c:63:93: warning: initializing 'const m2_rom_void_p *' (aka 'const void 
*const *') with an expression of type 'void *[6]' discards qualifiers in nested 
pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
m2_el_list_t el_gridlist = { { m2_el_gridlist_fn, "c3d0h50w100" } , 
sizeof(li)/sizeof(*li), li };
                                                                                            ^~
m2sdl.c:73:51: warning: excess elements in struct initializer
m2_el_u8_t v1 = { {m2_el_u8num_fn, "" } , 1, 130, &val };
                                                  ^~~~
m2sdl.c:77:74: warning: initializing 'const m2_rom_void_p *' (aka 'const void 
*const *') with an expression of type 'void *[5]' discards qualifiers in nested 
pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
m2_el_list_t el = { { m2_el_vlist_fn, base_fmt } , sizeof(l)/sizeof(*l), l };
                                                                         ^
m2sdl.c:87:24: warning: initializing 'void *' with an expression of type 'const 
m2_el_align_t *' (aka 'const struct _m2_el_align_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *align_list[] = { &align_go_top, &align_t0 };
                       ^~~~~~~~~~~~~
m2sdl.c:87:39: warning: initializing 'void *' with an expression of type 'const 
m2_el_align_t *' (aka 'const struct _m2_el_align_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *align_list[] = { &align_go_top, &align_t0 };
                                      ^~~~~~~~~
m2sdl.c:88:96: warning: initializing 'const m2_rom_void_p *' (aka 'const void 
*const *') with an expression of type 'void *[2]' discards qualifiers in nested 
pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
m2_el_list_t el_alignlist = { { m2_el_vlist_fn, "" } , 
sizeof(align_list)/sizeof(*align_list), align_list };
                                                                                               ^~~~~~~~~~
m2sdl.c:107:19: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *hlist[] = { &el_goto_top, &r1, &r2, &r3 };
                  ^~~~~~~~~~~~
m2sdl.c:108:82: warning: initializing 'const m2_rom_void_p *' (aka 'const void 
*const *') with an expression of type 'void *[4]' discards qualifiers in nested 
pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
m2_el_list_t el_hlist = { { m2_el_hlist_fn, "" } , 
sizeof(hlist)/sizeof(*hlist), hlist };
                                                                                 ^~~~~
m2sdl.c:111:87: warning: initializing 'const m2_rom_void_p *' (aka 'const void 
*const *') with an expression of type 'void *[3]' discards qualifiers in nested 
pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
m2_el_list_t el_hlist2 = { { m2_el_hlist_fn, "d1" } , 
sizeof(hlist2)/sizeof(*hlist2), hlist2 };
                                                                                      ^~~~~~
m2sdl.c:138:3: warning: initializing 'void *' with an expression of type 'const 
m2_el_str_t *' (aka 'const struct _m2_el_str_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
{ &label0, &label_el_val, 
  ^~~~~~~
m2sdl.c:138:12: warning: initializing 'void *' with an expression of type 
'const m2_el_u8_ptr_t *' (aka 'const struct _m2_el_u8_ptr_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
{ &label0, &label_el_val, 
           ^~~~~~~~~~~~~
m2sdl.c:140:3: warning: initializing 'void *' with an expression of type 'const 
m2_el_str_t *' (aka 'const struct _m2_el_str_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &label1, &label_el_text, 
  ^~~~~~~
m2sdl.c:140:12: warning: initializing 'void *' with an expression of type 
'const m2_el_text_t *' (aka 'const struct _m2_el_text_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &label1, &label_el_text, 
           ^~~~~~~~~~~~~~
m2sdl.c:141:3: warning: initializing 'void *' with an expression of type 'const 
m2_el_str_t *' (aka 'const struct _m2_el_str_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &label2, &label_el_val32, 
  ^~~~~~~
m2sdl.c:141:12: warning: initializing 'void *' with an expression of type 
'const m2_el_u32_t *' (aka 'const struct _m2_el_u32_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &label2, &label_el_val32, 
           ^~~~~~~~~~~~~~~
m2sdl.c:142:21: warning: initializing 'void *' with an expression of type 
'const m2_el_setval_t *' (aka 'const struct _m2_el_setval_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &m2_null_element, &label_el_toggle_val, 
                    ^~~~~~~~~~~~~~~~~~~~
m2sdl.c:143:3: warning: initializing 'void *' with an expression of type 'const 
m2_el_str_t *' (aka 'const struct _m2_el_str_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &label4, &el_hlist2, 
  ^~~~~~~
m2sdl.c:144:3: warning: initializing 'void *' with an expression of type 'const 
m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_goto_top };
  ^~~~~~~~~~~~
m2sdl.c:145:1: warning: initializing 'const m2_rom_void_p *' (aka 'const void 
*const *') with an expression of type 'void *[11]' discards qualifiers in 
nested pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
M2_GRIDLIST(el_label_list,"c2d0h50w120",label_list);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/m2.h:800:146: note: expanded from macro 'M2_GRIDLIST'
#define M2_GRIDLIST(el,fmt,list) M2_EL_CONST m2_el_list_t el M2_SECTION_PROGMEM 
= { { m2_el_gridlist_fn, (fmt) } , sizeof(list)/sizeof(*(list)), (list) }
                                                                                                                                                 ^~~~~~
m2sdl.c:155:3: warning: initializing 'void *' with an expression of type 'const 
m2_el_str_t *' (aka 'const struct _m2_el_str_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
{ &xy0, &xy_el_val, 
  ^~~~
m2sdl.c:155:9: warning: initializing 'void *' with an expression of type 'const 
m2_el_u8_ptr_t *' (aka 'const struct _m2_el_u8_ptr_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
{ &xy0, &xy_el_val, 
        ^~~~~~~~~~
m2sdl.c:156:3: warning: initializing 'void *' with an expression of type 'const 
m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_goto_top };
  ^~~~~~~~~~~~
m2sdl.c:158:1: warning: initializing 'const m2_rom_void_p *' (aka 'const void 
*const *') with an expression of type 'void *[3]' discards qualifiers in nested 
pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
M2_XYLIST(el_xy_list,"",xy_list);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/m2.h:801:142: note: expanded from macro 'M2_XYLIST'
#define M2_XYLIST(el,fmt,list) M2_EL_CONST m2_el_list_t el M2_SECTION_PROGMEM = 
{ { m2_el_xylist_fn, (fmt) } , sizeof(list)/sizeof(*(list)), (list) }
                                                                                                                                             ^~~~~~
m2sdl.c:371:27: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *top_list[] = { &t0, &el_to_hlist, &el_to_gridlist, &el_to_alignlist, 
&el_to_labellist, &el_to_single_u32, 
                          ^~~~~~~~~~~~
m2sdl.c:371:41: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *top_list[] = { &t0, &el_to_hlist, &el_to_gridlist, &el_to_alignlist, 
&el_to_labellist, &el_to_single_u32, 
                                        ^~~~~~~~~~~~~~~
m2sdl.c:371:58: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *top_list[] = { &t0, &el_to_hlist, &el_to_gridlist, &el_to_alignlist, 
&el_to_labellist, &el_to_single_u32, 
                                                         ^~~~~~~~~~~~~~~~
m2sdl.c:371:76: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *top_list[] = { &t0, &el_to_hlist, &el_to_gridlist, &el_to_alignlist, 
&el_to_labellist, &el_to_single_u32, 
                                                                           ^~~~~~~~~~~~~~~~
m2sdl.c:371:94: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
void *top_list[] = { &t0, &el_to_hlist, &el_to_gridlist, &el_to_alignlist, 
&el_to_labellist, &el_to_single_u32, 
                                                                                             ^~~~~~~~~~~~~~~~~
m2sdl.c:372:3: warning: initializing 'void *' with an expression of type 'const 
m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
  ^~~~~~~~~~~~~~
m2sdl.c:372:19: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
                  ^~~~~~~~~~~~~
m2sdl.c:372:34: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
                                 ^~~~~~~~~~~~~
m2sdl.c:372:49: warning: initializing 'void *' with an expression of type 
'const m2_el_button_t *' (aka 'const struct _m2_el_button_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
                                                ^~~~~~~~~~~
m2sdl.c:372:62: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
                                                             ^~~~~~~~~~~~
m2sdl.c:372:76: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
                                                                           ^~~~~~~~~~~~~~
m2sdl.c:372:92: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
                                                                                           ^~~~~~~~~~~~~~~
m2sdl.c:372:109: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
                                                                                                            ^~~~~~~~~~~~~~~
m2sdl.c:372:126: warning: initializing 'void *' with an expression of type 
'const m2_el_root_t *' (aka 'const struct _m2_el_root_struct *') discards 
qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  &el_to_xy_list, &el_to_issue6, &el_to_issue8, &el_set_msg, &el_to_combo, &el_to_strlist, &el_to_infolist, &el_to_timelist, &el_to_vlist };
                                                                                                                             ^~~~~~~~~~~~
m2sdl.c:374:1: warning: initializing 'const m2_rom_void_p *' (aka 'const void 
*const *') with an expression of type 'void *[15]' discards qualifiers in 
nested pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
M2_GRIDLIST(_el_top,"c3",top_list);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/m2.h:800:146: note: expanded from macro 'M2_GRIDLIST'
#define M2_GRIDLIST(el,fmt,list) M2_EL_CONST m2_el_list_t el M2_SECTION_PROGMEM 
= { { m2_el_gridlist_fn, (fmt) } , sizeof(list)/sizeof(*(list)), (list) }
                                                                                                                                                 ^~~~~~
m2sdl.c:377:10: error: redefinition of 'el_top' with a different type: 'const 
m2_el_align_t' (aka 'const struct _m2_el_align_struct') vs 'm2_el_align_t' (aka 
'struct _m2_el_align_struct')
M2_ALIGN(el_top, "w128h64", &_el_top);
         ^
../src/m2.h:862:62: note: expanded from macro 'M2_ALIGN'
#define M2_ALIGN(el, fmt, element) M2_EL_CONST m2_el_align_t el 
M2_SECTION_PROGMEM = {{ m2_el_align_fn, (fmt) }, (element) }
                                                             ^
m2sdl.c:34:22: note: previous definition is here
extern m2_el_align_t el_top;
                     ^
40 warnings and 1 error generated.
make: *** [m2sdl.o] Error 1

Original comment by lucas.be...@gmail.com on 22 Sep 2014 at 11:57

GoogleCodeExporter commented 9 years ago
This sdl folder is not maintained by me any more.
The code in m2tklib/sys/sdl_u8g should be ok.
Please try the makefile in m2tklib/sys/sdl_u8g

However, you may need to clone u8glib

Original comment by olikr...@gmail.com on 23 Sep 2014 at 4:27

GoogleCodeExporter commented 9 years ago
Thanks for the reply.

I had a feeling that the following would happen when I went to build. I've 
already had an issue (#281) open with u8glib and using Clang to build. It just 
seems to be some section attribute stuff that could be wrapped in a 
preprocessor directive.
I've read your reply to the u8glib issue, but I encourage you to try and build 
with Clang/LLVM on linux.

cc -g -Wall -I../../../../u8g/u8glib/csrc/.  -I../../src/. -I../../dev/u8glib/. 
-I../../dev/tty/. `sdl-config --cflags`    -c -o 
../../../../u8g/u8glib/sfntsrc/u8g_font_data.o 
../../../../u8g/u8glib/sfntsrc/u8g_font_data.c

../../../../u8g/u8glib/sfntsrc/u8g_font_data.c:18746:59: error: argument to 
'section' attribute is not valid for this target: mach-o section specifier 
requires a segment and section separated by a

      comma

const u8g_fntpgm_uint8_t u8g_font_fub20t[477] 
U8G_SECTION(".progmem.u8g_font_fub20t") = {

                                                          ^

../../../../u8g/u8glib/csrc/./u8g.h:79:54: note: expanded from macro 
'U8G_SECTION'

#  define U8G_SECTION(name) __attribute__ ((section (name)))

                                                     ^

1 error generated.

make: *** [../../../../u8g/u8glib/sfntsrc/u8g_font_data.o] Error 1 

Original comment by lucas.be...@gmail.com on 23 Sep 2014 at 9:06

GoogleCodeExporter commented 9 years ago
What could be done, is to let the macro expand to nothing on Clang.
Would this help?
I mean, will
#define U8G_SECTION(name)
help?
If so, how can i detect Clang? Are the any macro definitions to identify this 
compiler?

Original comment by olikr...@gmail.com on 23 Sep 2014 at 10:32

GoogleCodeExporter commented 9 years ago
The following is the output of `clang -dM -E -x c /dev/null `, and should list 
everything that Clang emits (at least on my machine). __clang__ should be a 
safe place to start.

I'm not sure how letting the macro expand to nothing would help, as I'm sure 
the macro does something useful in the first place...

#define OBJC_NEW_PROPERTIES 1
#define _LP64 1
#define __APPLE_CC__ 6000
#define __APPLE__ 1
#define __ATOMIC_ACQUIRE 2
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_CONSUME 1
#define __ATOMIC_RELAXED 0
#define __ATOMIC_RELEASE 3
#define __ATOMIC_SEQ_CST 5
#define __BLOCKS__ 1
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __CHAR16_TYPE__ unsigned short
#define __CHAR32_TYPE__ unsigned int
#define __CHAR_BIT__ 8
#define __CONSTANT_CFSTRINGS__ 1
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __DBL_DIG__ 15
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN__ 2.2250738585072014e-308
#define __DECIMAL_DIG__ 21
#define __DYNAMIC__ 1
#define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1090
#define __FINITE_MATH_ONLY__ 0
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_DIG__ 6
#define __FLT_EPSILON__ 1.19209290e-7F
#define __FLT_EVAL_METHOD__ 0
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MANT_DIG__ 24
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX__ 3.40282347e+38F
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN__ 1.17549435e-38F
#define __FLT_RADIX__ 2
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC_STDC_INLINE__ 1
#define __GNUC__ 4
#define __GXX_ABI_VERSION 1002
#define __GXX_RTTI 1
#define __INT16_TYPE__ short
#define __INT32_TYPE__ int
#define __INT64_C_SUFFIX__ LL
#define __INT64_TYPE__ long long int
#define __INT8_TYPE__ char
#define __INTMAX_MAX__ 9223372036854775807L
#define __INTMAX_TYPE__ long int
#define __INTMAX_WIDTH__ 64
#define __INTPTR_TYPE__ long int
#define __INTPTR_WIDTH__ 64
#define __INT_MAX__ 2147483647
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
#define __LDBL_DIG__ 18
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 64
#define __LDBL_MAX_10_EXP__ 4932
#define __LDBL_MAX_EXP__ 16384
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __LDBL_MIN_10_EXP__ (-4931)
#define __LDBL_MIN_EXP__ (-16381)
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define __LITTLE_ENDIAN__ 1
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __LONG_MAX__ 9223372036854775807L
#define __LP64__ 1
#define __MACH__ 1
#define __MMX__ 1
#define __NO_INLINE__ 1
#define __NO_MATH_INLINES 1
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_PDP_ENDIAN__ 3412
#define __PIC__ 2
#define __POINTER_WIDTH__ 64
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __PTRDIFF_TYPE__ long int
#define __PTRDIFF_WIDTH__ 64
#define __REGISTER_PREFIX__ 
#define __SCHAR_MAX__ 127
#define __SHRT_MAX__ 32767
#define __SIG_ATOMIC_WIDTH__ 32
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_INT128__ 16
#define __SIZEOF_INT__ 4
#define __SIZEOF_LONG_DOUBLE__ 16
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_LONG__ 8
#define __SIZEOF_POINTER__ 8
#define __SIZEOF_PTRDIFF_T__ 8
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_SIZE_T__ 8
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SIZE_MAX__ 18446744073709551615UL
#define __SIZE_TYPE__ long unsigned int
#define __SIZE_WIDTH__ 64
#define __SSE2_MATH__ 1
#define __SSE2__ 1
#define __SSE3__ 1
#define __SSE_MATH__ 1
#define __SSE__ 1
#define __SSP__ 1
#define __SSSE3__ 1
#define __STDC_HOSTED__ 1
#define __STDC_UTF_16__ 1
#define __STDC_UTF_32__ 1
#define __STDC_VERSION__ 199901L
#define __STDC__ 1
#define __UINTMAX_TYPE__ long unsigned int
#define __USER_LABEL_PREFIX__ _
#define __VERSION__ "4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)"
#define __WCHAR_MAX__ 2147483647
#define __WCHAR_TYPE__ int
#define __WCHAR_WIDTH__ 32
#define __WINT_TYPE__ int
#define __WINT_WIDTH__ 32
#define __amd64 1
#define __amd64__ 1
#define __apple_build_version__ 5030040
#define __block __attribute__((__blocks__(byref)))
#define __clang__ 1
#define __clang_major__ 5
#define __clang_minor__ 1
#define __clang_patchlevel__ 0
#define __clang_version__ "5.1 (clang-503.0.40)"
#define __core2 1
#define __core2__ 1
#define __llvm__ 1
#define __pic__ 2
#define __strong 
#define __tune_core2__ 1
#define __unsafe_unretained 
#define __weak __attribute__((objc_gc(weak)))
#define __x86_64 1
#define __x86_64__ 1

Original comment by lucas.be...@gmail.com on 24 Sep 2014 at 10:59

GoogleCodeExporter commented 9 years ago
Yes, it does, but not for the desktop code.
This is mainly for the garbage collector of the avr gcc.

So the task ist: if __clang__ is defined, let
 U8G_SECTION(name)
expand to nothing.

Original comment by olikr...@gmail.com on 24 Sep 2014 at 5:36