comparison gcc/config/avr/driver-avr.c @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents 77e2b8dfacca
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
1 /* Subroutines for the gcc driver. 1 /* Subroutines for the gcc driver.
2 Copyright (C) 2009 Free Software Foundation, Inc. 2 Copyright (C) 2009, 2010 Free Software Foundation, Inc.
3 Contributed by Anatoly Sokolov <aesok@post.ru> 3 Contributed by Anatoly Sokolov <aesok@post.ru>
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify 7 GCC is free software; you can redistribute it and/or modify
20 20
21 #include "config.h" 21 #include "config.h"
22 #include "system.h" 22 #include "system.h"
23 #include "coretypes.h" 23 #include "coretypes.h"
24 #include "tm.h" 24 #include "tm.h"
25 #include <stdlib.h>
26 25
27 /* Current architecture. */ 26 /* Current architecture. */
28 const struct base_arch_s *avr_current_arch = NULL; 27 const struct base_arch_s *avr_current_arch = NULL;
29 28
30 /* Current device. */ 29 /* Current device. */
53 52
54 const char * 53 const char *
55 avr_device_to_arch (int argc, const char **argv) 54 avr_device_to_arch (int argc, const char **argv)
56 { 55 {
57 if (0 == argc) 56 if (0 == argc)
58 return; 57 return NULL;
59 58
60 avr_set_current_device (argv[0]); 59 avr_set_current_device (argv[0]);
61 60
62 return concat ("-m ", avr_current_arch->arch_name, NULL); 61 return concat ("-m ", avr_current_arch->arch_name, NULL);
63 } 62 }
69 { 68 {
70 unsigned long data_section_start; 69 unsigned long data_section_start;
71 char data_section_start_str[16]; 70 char data_section_start_str[16];
72 71
73 if (0 == argc) 72 if (0 == argc)
74 return; 73 return NULL;
75 74
76 avr_set_current_device (argv[0]); 75 avr_set_current_device (argv[0]);
77 76
78 if (avr_current_device->data_section_start 77 if (avr_current_device->data_section_start
79 == avr_current_arch->default_data_section_start) 78 == avr_current_arch->default_data_section_start)
91 90
92 const char * 91 const char *
93 avr_device_to_startfiles (int argc, const char **argv) 92 avr_device_to_startfiles (int argc, const char **argv)
94 { 93 {
95 if (0 == argc) 94 if (0 == argc)
96 return; 95 return NULL;
97 96
98 avr_set_current_device (argv[0]); 97 avr_set_current_device (argv[0]);
99 98
100 return concat ("crt", avr_current_device->library_name, ".o%s", NULL); 99 return concat ("crt", avr_current_device->library_name, ".o%s", NULL);
101 } 100 }
104 103
105 const char * 104 const char *
106 avr_device_to_devicelib (int argc, const char **argv) 105 avr_device_to_devicelib (int argc, const char **argv)
107 { 106 {
108 if (0 == argc) 107 if (0 == argc)
109 return; 108 return NULL;
110 109
111 avr_set_current_device (argv[0]); 110 avr_set_current_device (argv[0]);
112 111
113 return concat ("-l", avr_current_device->library_name, NULL); 112 return concat ("-l", avr_current_device->library_name, NULL);
114 } 113 }