]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #8353 from opensourcerouting/llvm-20210327
authorQuentin Young <qlyoung@users.noreply.github.com>
Tue, 1 Jun 2021 19:08:32 +0000 (19:08 +0000)
committerGitHub <noreply@github.com>
Tue, 1 Jun 2021 19:08:32 +0000 (19:08 +0000)
1  2 
.gitignore
lib/prefix.h
tools/subdir.am

diff --combined .gitignore
index 4e120dae854366fe5224d32e4875172697c5db87,cfef99ba97eeaf352c6b31f1b3db31ed5364e3a1..33d03296dbc8d20a79870f7fe856890cf5298999
@@@ -30,6 -30,7 +30,7 @@@
  /libtool.orig
  /changelog-auto
  /test-driver
+ /test-suite.log
  
  /Makefile
  /Makefile.in
@@@ -57,6 -58,7 +58,7 @@@
  *.pb.cc
  *_clippy.c
  *.bc
+ *.ll
  *.cg.json
  *.cg.dot
  *.cg.svg
@@@ -110,5 -112,3 +112,5 @@@ refi
  .vscode
  .kitchen
  .emacs.desktop*
 +
 +/test-suite.log
diff --combined lib/prefix.h
index d7ee1b8e4c336abb77e143d7bac6faa408436426,6f1c219ba8f227b80afe49afdc4aaa7656b6e837..217a23d561c061951370991fc8871d4d93be1fa5
@@@ -315,10 -315,12 +315,12 @@@ struct prefix_sg 
  #ifndef __cplusplus
  #define prefixtype(uname, typename, fieldname) \
        typename *fieldname;
+ #define TRANSPARENT_UNION __attribute__((transparent_union))
  #else
  #define prefixtype(uname, typename, fieldname) \
        typename *fieldname; \
        uname(typename *x) { this->fieldname = x; }
+ #define TRANSPARENT_UNION
  #endif
  
  union prefixptr {
        prefixtype(prefixptr, struct prefix_evpn, evp)
        prefixtype(prefixptr, struct prefix_fs,   fs)
        prefixtype(prefixptr, struct prefix_rd,   rd)
- } __attribute__((transparent_union));
+ } TRANSPARENT_UNION;
  
  union prefixconstptr {
        prefixtype(prefixconstptr, const struct prefix,      p)
        prefixtype(prefixconstptr, const struct prefix_evpn, evp)
        prefixtype(prefixconstptr, const struct prefix_fs,   fs)
        prefixtype(prefixconstptr, const struct prefix_rd,   rd)
- } __attribute__((transparent_union));
+ } TRANSPARENT_UNION;
+ #undef prefixtype
+ #undef TRANSPARENT_UNION
  
  #ifndef INET_ADDRSTRLEN
  #define INET_ADDRSTRLEN 16
@@@ -504,6 -509,8 +509,6 @@@ extern void apply_mask_ipv6(struct pref
  extern int ip6_masklen(struct in6_addr);
  extern void masklen2ip6(const int, struct in6_addr *);
  
 -extern const char *inet6_ntoa(struct in6_addr);
 -
  extern int is_zero_mac(const struct ethaddr *mac);
  extern bool is_mcast_mac(const struct ethaddr *mac);
  extern bool is_bcast_mac(const struct ethaddr *mac);
diff --combined tools/subdir.am
index 6a03a23baa7b33f0ebd47e4823a8b9edba37317f,027763cf91f2f030485a3224526640ffbef636cf..e4b9ecd84ff334c1c5b4dc3069328c0696c899de
@@@ -34,15 -34,19 +34,21 @@@ tools_gen_yang_deviations_SOURCES = too
  tools_gen_yang_deviations_LDADD = lib/libfrr.la $(LIBYANG_LIBS)
  
  tools_ssd_SOURCES = tools/start-stop-daemon.c
 +tools_ssd_CPPFLAGS =
  
  # don't bother autoconf'ing these for a simple optional tool
  llvm_version = $(shell echo __clang_major__ | $(CC) -xc -P -E -)
 +tools_frr_llvm_cg_CPPFLAGS = $(CPPFLAGS_BASE)
  tools_frr_llvm_cg_CFLAGS = $(AM_CFLAGS) `llvm-config-$(llvm_version) --cflags`
+ tools_frr_llvm_cg_CXXFLAGS = $(AM_CXXFLAGS) -O0 -ggdb3 `llvm-config-$(llvm_version) --cxxflags`
  tools_frr_llvm_cg_LDFLAGS = `llvm-config-$(llvm_version) --ldflags --libs`
  tools_frr_llvm_cg_SOURCES = \
        tools/frr-llvm-cg.c \
+       tools/frr-llvm-debuginfo.cpp \
+       # end
+ noinst_HEADERS += \
+       tools/frr-llvm-debuginfo.h \
        # end
  
  EXTRA_DIST += \