source: rtems-tools/linkers/rld-cc.h @ 40fd7a0

4.104.115
Last change on this file since 40fd7a0 was 40fd7a0, checked in by Chris Johns <chrisj@…>, on Sep 1, 2014 at 3:26:47 AM

rld: Split the file into a path module for path specific functions.

This allows resued for other parts of the system not dependent on
objcet files or archives.

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/*
2 * Copyright (c) 2011-2014, Chris Johns <chrisj@rtems.org>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16/**
17 * @file
18 *
19 * @ingroup rtems-ld
20 *
21 * @brief Various calls to CC.
22 *
23 */
24
25#if !defined (_RLD_CC_H_)
26#define _RLD_CC_H_
27
28#include <string>
29
30#include <rld-files.h>
31#include <rld-process.h>
32
33namespace rld
34{
35  namespace cc
36  {
37    extern std::string cc;             //< The CC executable as absolute path.
38    extern std::string cc_name;        //< The CC name, ie gcc, clang.
39    extern std::string exec_prefix;    //< The CC executable prefix.
40
41    extern std::string cppflags;       //< The CPP flags.
42    extern std::string cflags;         //< The CC flags.
43    extern std::string cxxflags;       //< The CXX flags.
44    extern std::string ldflags;        //< The LD flags.
45
46    extern std::string install_path;   //< The CC reported install path.
47    extern std::string programs_path;  //< The CC reported programs path.
48    extern std::string libraries_path; //< The CC reported libraries path.
49
50    /**
51     * Make a CC command from the set arguments.
52     */
53    void make_cc_command (rld::process::arg_container& args);
54
55    /**
56     * If the cppflags has been set append to the arguments.
57     */
58    void add_cppflags (rld::process::arg_container& args);
59
60    /**
61     * If the cflags has been set append to the arguments.
62     */
63    void add_cflags (rld::process::arg_container& args);
64
65    /**
66     * If the cxxflags has been set append to the arguments.
67     */
68    void add_cxxflags (rld::process::arg_container& args);
69
70    /**
71     * If the ldflags has been set append to the arguments.
72     */
73    void add_ldflags (rld::process::arg_container& args);
74
75    /**
76     * Get the standard libraries paths from the compiler.
77     */
78    void get_standard_libpaths (rld::path::paths& libpaths);
79
80    /**
81     * Get the standard libraries. Optionally add the C++ library.
82     */
83    void get_standard_libs (rld::path::paths& libs,
84                            rld::path::paths& libpaths,
85                            bool              cpp = false);
86
87  }
88}
89
90#endif
Note: See TracBrowser for help on using the repository browser.