http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764
Summary: [gcc-avr] Compiling for Arduino is not working Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: critical Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: artem...@gmail.com Compiling any of the examples in arduino (IDE) gives this: In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Tone.cpp:37:0: /usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:66:48: error: variable 'port_to_mode_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))' /usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:67:49: error: variable 'port_to_input_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))' /usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:68:50: error: variable 'port_to_output_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))' /usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:70:54: error: variable 'digital_pin_to_port_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))' /usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:72:58: error: variable 'digital_pin_to_bit_mask_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))' /usr/share/arduino/hardware/arduino/cores/arduino/pins_arduino.h:73:55: error: variable 'digital_pin_to_timer_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))' /usr/share/arduino/hardware/arduino/cores/arduino/Tone.cpp:108:45: error: variable 'tone_pin_to_timer_PGM' must be const in order to be put into read-only section by means of '__attribute__((progmem))' Additional info: Occures only on gcc-avr-4.6.1-1, reinstalling previous (gcc-avr-4.6.0-3) gives successful compilation. I checked the file files pins_arduino.h, pins_arduino.c and Tone.cpp on both gcc-avr-4.6.1-1 and gcc-avr-4.6.0-3 they are equal. So the issue is in the gcc-avr package. Steps to reproduce: 1. Open arduino (IDE) 2. Select any example from File->Examples 3. Click on play icon (compile) Step 2 can be left out, just clicking play icon (compile) on an empty sketch gives same error on gcc-avr-4.6.1-1