diff options
author | vanilla <vanilla@FreeBSD.org> | 2017-10-06 14:27:43 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2017-10-06 14:27:43 +0800 |
commit | ce7a148bde9bafba19bfffce58fc3f1ef2ecc8fe (patch) | |
tree | 10b66bfe504d45958c3a86d4b488bd9e19094031 | |
parent | 59a33566c863b980585f5b2d80fa33df68531016 (diff) | |
download | freebsd-ports-gnome-ce7a148bde9bafba19bfffce58fc3f1ef2ecc8fe.tar.gz freebsd-ports-gnome-ce7a148bde9bafba19bfffce58fc3f1ef2ecc8fe.tar.zst freebsd-ports-gnome-ce7a148bde9bafba19bfffce58fc3f1ef2ecc8fe.zip |
Fix building with clang.
-rw-r--r-- | misc/rump/Makefile | 7 | ||||
-rw-r--r-- | misc/rump/files/patch-src_share_mk_bsd.sys.mk | 11 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_net_agr_if__agr.c | 19 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_net_if__gif.c | 12 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_net_if__loop.c | 18 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_net_if__pppoe.c | 12 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_net_if__spppsubr.c | 29 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_net_if__tap.c | 12 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_netinet_in__offload.c | 14 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_netinet_ip__carp.c | 12 | ||||
-rw-r--r-- | misc/rump/files/patch-src_sys_rump_net_lib_libshmif_if__shmem.c | 12 |
11 files changed, 153 insertions, 5 deletions
diff --git a/misc/rump/Makefile b/misc/rump/Makefile index 5cfd4f282fe8..c15f19dbbfbc 100644 --- a/misc/rump/Makefile +++ b/misc/rump/Makefile @@ -18,11 +18,8 @@ USE_GITHUB= yes GH_ACCOUNT= rumpkernel GH_PROJECT= buildrump.sh GH_TAGNAME= b914579 -GH_TUPLE= rumpkernel:src-netbsd:82f3a69:netbsd/src +GH_TUPLE= rumpkernel:src-netbsd:82f3a69:netbsd/src USE_LDCONFIG= yes -USE_GCC= any - -.include <bsd.port.pre.mk> do-build: cd ${WRKSRC}; ${SETENV} CC=${CC} AR=${AR} NM=${NM} OBJCOPY=${OBJCOPY} ./buildrump.sh -r fullbuild @@ -30,4 +27,4 @@ do-build: do-install: cd ${WRKSRC}/rump; ${PAX} -wr lib include ${STAGEDIR}${PREFIX}/ -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/misc/rump/files/patch-src_share_mk_bsd.sys.mk b/misc/rump/files/patch-src_share_mk_bsd.sys.mk new file mode 100644 index 000000000000..1fe819cc95c0 --- /dev/null +++ b/misc/rump/files/patch-src_share_mk_bsd.sys.mk @@ -0,0 +1,11 @@ +--- src/share/mk/bsd.sys.mk.orig 2016-08-02 11:51:10 UTC ++++ src/share/mk/bsd.sys.mk +@@ -83,7 +83,7 @@ CFLAGS+= -Wreturn-type -Wswitch -Wshadow + .endif + .if ${WARNS} > 2 + CFLAGS+= -Wcast-qual -Wwrite-strings +-CFLAGS+= -Wextra -Wno-unused-parameter ++CFLAGS+= -Wextra -Wno-unused-parameter -Wno-address-of-packed-member -Wno-varargs + # Readd -Wno-sign-compare to override -Wextra with clang + CFLAGS+= -Wno-sign-compare + CXXFLAGS+= -Wabi diff --git a/misc/rump/files/patch-src_sys_net_agr_if__agr.c b/misc/rump/files/patch-src_sys_net_agr_if__agr.c new file mode 100644 index 000000000000..335693928fe2 --- /dev/null +++ b/misc/rump/files/patch-src_sys_net_agr_if__agr.c @@ -0,0 +1,19 @@ +--- src/sys/net/agr/if_agr.c.orig 2016-08-02 11:51:10 UTC ++++ src/sys/net/agr/if_agr.c +@@ -317,6 +317,7 @@ agr_clone_create(struct if_clone *ifc, i + { + struct agr_softc *sc; + struct ifnet *ifp; ++ int tmp = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + + sc = agr_alloc_softc(); + TAILQ_INIT(&sc->sc_ports); +@@ -330,7 +331,7 @@ agr_clone_create(struct if_clone *ifc, i + ifc->ifc_name, unit); + + ifp->if_softc = sc; +- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ++ ifp->if_flags = tmp; + ifp->if_start = agr_start; + ifp->if_ioctl = agr_ioctl; + IFQ_SET_READY(&ifp->if_snd); diff --git a/misc/rump/files/patch-src_sys_net_if__gif.c b/misc/rump/files/patch-src_sys_net_if__gif.c new file mode 100644 index 000000000000..4e028196a2ee --- /dev/null +++ b/misc/rump/files/patch-src_sys_net_if__gif.c @@ -0,0 +1,12 @@ +--- src/sys/net/if_gif.c.orig 2017-09-26 10:05:48 UTC ++++ src/sys/net/if_gif.c +@@ -192,7 +192,8 @@ gifattach0(struct gif_softc *sc) + + sc->gif_if.if_addrlen = 0; + sc->gif_if.if_mtu = GIF_MTU; +- sc->gif_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST; ++ int tmp = IFF_POINTOPOINT | IFF_MULTICAST; ++ sc->gif_if.if_flags = tmp; + sc->gif_if.if_extflags = IFEF_NO_LINK_STATE_CHANGE; + sc->gif_if.if_ioctl = gif_ioctl; + sc->gif_if.if_output = gif_output; diff --git a/misc/rump/files/patch-src_sys_net_if__loop.c b/misc/rump/files/patch-src_sys_net_if__loop.c new file mode 100644 index 000000000000..aaccee5330dc --- /dev/null +++ b/misc/rump/files/patch-src_sys_net_if__loop.c @@ -0,0 +1,18 @@ +--- src/sys/net/if_loop.c.orig 2016-08-02 11:51:10 UTC ++++ src/sys/net/if_loop.c +@@ -150,13 +150,14 @@ static int + loop_clone_create(struct if_clone *ifc, int unit) + { + struct ifnet *ifp; ++ int tmp = IFF_LOOPBACK | IFF_MULTICAST | IFF_RUNNING; + + ifp = if_alloc(IFT_LOOP); + + if_initname(ifp, ifc->ifc_name, unit); + + ifp->if_mtu = LOMTU; +- ifp->if_flags = IFF_LOOPBACK | IFF_MULTICAST | IFF_RUNNING; ++ ifp->if_flags = tmp; + ifp->if_extflags = IFEF_OUTPUT_MPSAFE; + ifp->if_ioctl = loioctl; + ifp->if_output = looutput; diff --git a/misc/rump/files/patch-src_sys_net_if__pppoe.c b/misc/rump/files/patch-src_sys_net_if__pppoe.c new file mode 100644 index 000000000000..4f024159e9e0 --- /dev/null +++ b/misc/rump/files/patch-src_sys_net_if__pppoe.c @@ -0,0 +1,12 @@ +--- src/sys/net/if_pppoe.c.orig 2017-09-26 10:07:00 UTC ++++ src/sys/net/if_pppoe.c +@@ -227,7 +227,8 @@ pppoe_clone_create(struct if_clone *ifc, + if_initname(&sc->sc_sppp.pp_if, "pppoe", unit); + sc->sc_sppp.pp_if.if_softc = sc; + sc->sc_sppp.pp_if.if_mtu = PPPOE_MAXMTU; +- sc->sc_sppp.pp_if.if_flags = IFF_SIMPLEX|IFF_POINTOPOINT|IFF_MULTICAST; ++ int tmp = IFF_SIMPLEX|IFF_POINTOPOINT|IFF_MULTICAST; ++ sc->sc_sppp.pp_if.if_flags = tmp; + sc->sc_sppp.pp_if.if_type = IFT_PPP; + sc->sc_sppp.pp_if.if_hdrlen = sizeof(struct ether_header) + PPPOE_HEADERLEN; + sc->sc_sppp.pp_if.if_dlt = DLT_PPP_ETHER; diff --git a/misc/rump/files/patch-src_sys_net_if__spppsubr.c b/misc/rump/files/patch-src_sys_net_if__spppsubr.c new file mode 100644 index 000000000000..50e601f5eb84 --- /dev/null +++ b/misc/rump/files/patch-src_sys_net_if__spppsubr.c @@ -0,0 +1,29 @@ +--- src/sys/net/if_spppsubr.c.orig 2016-08-02 11:51:10 UTC ++++ src/sys/net/if_spppsubr.c +@@ -3185,7 +3185,7 @@ sppp_ipcp_scr(struct sppp *sp) + + #ifdef notyet + if (sp->ipcp.opts & (1 << IPCP_OPT_COMPRESSION)) { +- opt[i++] = IPCP_OPT_COMPRESSION; ++ opt[i++] = (char)IPCP_OPT_COMPRESSION; + opt[i++] = 6; + opt[i++] = 0; /* VJ header compression */ + opt[i++] = 0x2d; /* VJ header compression */ +@@ -3210,7 +3210,7 @@ sppp_ipcp_scr(struct sppp *sp) + #endif + + if (sp->query_dns & 1) { +- opt[i++] = IPCP_OPT_PRIMDNS; ++ opt[i++] = (char)IPCP_OPT_PRIMDNS; + opt[i++] = 6; + opt[i++] = sp->dns_addrs[0] >> 24; + opt[i++] = sp->dns_addrs[0] >> 16; +@@ -3218,7 +3218,7 @@ sppp_ipcp_scr(struct sppp *sp) + opt[i++] = sp->dns_addrs[0]; + } + if (sp->query_dns & 2) { +- opt[i++] = IPCP_OPT_SECDNS; ++ opt[i++] = (char)IPCP_OPT_SECDNS; + opt[i++] = 6; + opt[i++] = sp->dns_addrs[1] >> 24; + opt[i++] = sp->dns_addrs[1] >> 16; diff --git a/misc/rump/files/patch-src_sys_net_if__tap.c b/misc/rump/files/patch-src_sys_net_if__tap.c new file mode 100644 index 000000000000..5d875be0cb10 --- /dev/null +++ b/misc/rump/files/patch-src_sys_net_if__tap.c @@ -0,0 +1,12 @@ +--- src/sys/net/if_tap.c.orig 2017-09-26 10:11:03 UTC ++++ src/sys/net/if_tap.c +@@ -332,7 +332,8 @@ tap_attach(device_t parent, device_t sel + ifp = &sc->sc_ec.ec_if; + strcpy(ifp->if_xname, device_xname(self)); + ifp->if_softc = sc; +- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ++ int tmp = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ++ ifp->if_flags = tmp; + ifp->if_ioctl = tap_ioctl; + ifp->if_start = tap_start; + ifp->if_stop = tap_stop; diff --git a/misc/rump/files/patch-src_sys_netinet_in__offload.c b/misc/rump/files/patch-src_sys_netinet_in__offload.c new file mode 100644 index 000000000000..ff108ad0f591 --- /dev/null +++ b/misc/rump/files/patch-src_sys_netinet_in__offload.c @@ -0,0 +1,14 @@ +--- src/sys/netinet/in_offload.c.orig 2016-08-02 11:51:10 UTC ++++ src/sys/netinet/in_offload.c +@@ -210,9 +210,10 @@ ip_undefer_csum(struct mbuf *m, size_t h + + if (__predict_true(hdrlen + sizeof(struct ip) <= m->m_len)) { + struct ip *ip = (struct ip *)(mtod(m, uint8_t *) + hdrlen); ++ short tmp = ip->ip_sum; + + ip_len = ip->ip_len; +- csump = &ip->ip_sum; ++ csump = &tmp; + } else { + const size_t ip_len_offset = + hdrlen + offsetof(struct ip, ip_len); diff --git a/misc/rump/files/patch-src_sys_netinet_ip__carp.c b/misc/rump/files/patch-src_sys_netinet_ip__carp.c new file mode 100644 index 000000000000..be5f2d986209 --- /dev/null +++ b/misc/rump/files/patch-src_sys_netinet_ip__carp.c @@ -0,0 +1,12 @@ +--- src/sys/netinet/ip_carp.c.orig 2017-09-26 10:03:06 UTC ++++ src/sys/netinet/ip_carp.c +@@ -827,7 +827,8 @@ carp_clone_create(struct if_clone *ifc, + ifp->if_softc = sc; + snprintf(ifp->if_xname, sizeof ifp->if_xname, "%s%d", ifc->ifc_name, + unit); +- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ++ int tmp = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ++ ifp->if_flags = tmp; + ifp->if_ioctl = carp_ioctl; + ifp->if_start = carp_start; + ifp->if_output = carp_output; diff --git a/misc/rump/files/patch-src_sys_rump_net_lib_libshmif_if__shmem.c b/misc/rump/files/patch-src_sys_rump_net_lib_libshmif_if__shmem.c new file mode 100644 index 000000000000..39b9f3a9c16c --- /dev/null +++ b/misc/rump/files/patch-src_sys_rump_net_lib_libshmif_if__shmem.c @@ -0,0 +1,12 @@ +--- src/sys/rump/net/lib/libshmif/if_shmem.c.orig 2017-09-26 10:09:42 UTC ++++ src/sys/rump/net/lib/libshmif/if_shmem.c +@@ -176,7 +176,8 @@ allocif(int unit, struct shmif_sc **scp) + + snprintf(ifp->if_xname, sizeof(ifp->if_xname), "shmif%d", unit); + ifp->if_softc = sc; +- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ++ int tmp = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ++ ifp->if_flags = tmp; + ifp->if_init = shmif_init; + ifp->if_ioctl = shmif_ioctl; + ifp->if_start = shmif_start; |