From 939b12b52ec3465eb8a2033b243cea85ec057d2b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 11 Jul 2012 17:38:09 -0500 Subject: Makefile: Enable most files to build --- freebsd-userspace/Makefile | 47 ++++++++++++++++++++------------------- freebsd-userspace/from-freebsd.sh | 20 +++++++++++++---- 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/freebsd-userspace/Makefile b/freebsd-userspace/Makefile index 1417f65b..75e3f334 100644 --- a/freebsd-userspace/Makefile +++ b/freebsd-userspace/Makefile @@ -39,49 +39,50 @@ C_FILES += lib/libc/inet/nsap_addr.c C_FILES += lib/libc/net/base64.c C_FILES += lib/libc/net/ether_addr.c -# C_FILES += lib/libc/net/gethostbydns.c -# C_FILES += lib/libc/net/gethostbyht.c +C_FILES += lib/libc/net/gethostbydns.c +C_FILES += lib/libc/net/gethostbyht.c C_FILES += lib/libc/net/gethostbynis.c -# C_FILES += lib/libc/net/gethostnamadr.c +C_FILES += lib/libc/net/gethostnamadr.c C_FILES += lib/libc/net/getifaddrs.c C_FILES += lib/libc/net/getifmaddrs.c C_FILES += lib/libc/net/getnameinfo.c -# C_FILES += lib/libc/net/getnetbydns.c -# C_FILES += lib/libc/net/getnetbyht.c +C_FILES += lib/libc/net/getnetbydns.c +C_FILES += lib/libc/net/getnetbyht.c C_FILES += lib/libc/net/getnetbynis.c -# C_FILES += lib/libc/net/getnetnamadr.c -# C_FILES += lib/libc/net/getproto.c -# C_FILES += lib/libc/net/getprotoent.c -# C_FILES += lib/libc/net/getprotoname.c +C_FILES += lib/libc/net/getnetnamadr.c +C_FILES += lib/libc/net/getproto.c +C_FILES += lib/libc/net/getprotoent.c +C_FILES += lib/libc/net/getprotoname.c +# _ALIGNBYTES needs to be addressed # C_FILES += lib/libc/net/getservent.c C_FILES += lib/libc/gen/gethostname.c -# C_FILES += lib/libc/nameser/ns_name.c +C_FILES += lib/libc/nameser/ns_name.c C_FILES += lib/libc/nameser/ns_netint.c C_FILES += lib/libc/nameser/ns_parse.c +# isc/assertions.h is needed # C_FILES += lib/libc/nameser/ns_print.c C_FILES += lib/libc/nameser/ns_ttl.c C_FILES += lib/libc/net/if_indextoname.c C_FILES += lib/libc/net/if_nameindex.c C_FILES += lib/libc/net/linkaddr.c -# C_FILES += lib/libc/net/map_v4v6.c -# C_FILES += lib/libc/net/rcmd.c +C_FILES += lib/libc/net/map_v4v6.c +C_FILES += lib/libc/net/rcmd.c C_FILES += lib/libc/net/recv.c C_FILES += lib/libc/net/send.c # iovec redefined between RTEMS and FreeBSD # C_FILES += lib/libc/resolv/herror.c C_FILES += lib/libc/resolv/res_comp.c -# Little of res_XXX compiles without BIND_4_COMPAT fixed -# one of many needing BIND_4_COMPAT defined (#1 issue impacting most) -# C_FILES += lib/libc/resolv/res_data.c -# one of many needing BIND_4_COMPAT defined (#1 issue impacting most) -# C_FILES += lib/libc/resolv/res_debug.c -# one of many needing BIND_4_COMPAT defined (#1 issue impacting most) -# C_FILES += lib/libc/resolv/res_init.c -# C_FILES += lib/libc/resolv/res_mkquery.c +C_FILES += lib/libc/resolv/res_data.c +C_FILES += lib/libc/resolv/res_debug.c +C_FILES += lib/libc/resolv/res_init.c +C_FILES += lib/libc/resolv/res_mkquery.c +# weird compile problem with what appears to be a list # C_FILES += lib/libc/resolv/res_mkupdate.c -# C_FILES += lib/libc/resolv/res_query.c -#C_FILES += lib/libc/resolv/res_send.c -#C_FILES += lib/libc/resolv/res_update.c +C_FILES += lib/libc/resolv/res_query.c +# fd_setsize.h is missing and Joel can't find it +# C_FILES += lib/libc/resolv/res_send.c +# isc/list.h is missing +# C_FILES += lib/libc/resolv/res_update.c C_FILES += lib/libc/string/strsep.c C_FILES += rtems/rtems-net-setup.c diff --git a/freebsd-userspace/from-freebsd.sh b/freebsd-userspace/from-freebsd.sh index e7fc4d8a..1a24008e 100755 --- a/freebsd-userspace/from-freebsd.sh +++ b/freebsd-userspace/from-freebsd.sh @@ -123,8 +123,8 @@ include/rpc/svc.h include/rpc/svc_auth.h include/rpc/svc_soc.h include/rpc/xdr.h -include/arpa/nameser_compat.h include/arpa/inet.h +include/arpa/nameser.h sys/net/ethernet.h sys/rpc/types.h sys/sys/_null.h @@ -153,11 +153,19 @@ lib/libc/inet/nsap_addr.c lib/libc/net/netdb_private.h lib/libc/net/res_config.h EOF +# processed by hand +# include/arpa/nameser_compat.h # disable BIND_4_COMPAT since it trips a weird endian issue in nameser_compat.h -sed -e 's/#define BIND_4_COMPAT/\/* #define BIND_4_COMPAT *\//' \ - <${src}/include/arpa/nameser.h \ - >${dest}/include/arpa/nameser.h +#sed -e 's/#define BIND_4_COMPAT/\/* #define BIND_4_COMPAT *\//' \ +# >${dest}/include/arpa/nameser.h +# <${src}/include/arpa/nameser.h \ + +# fix include so it sees FreeBSD endian definitions +sed -e 's///' \ + <${src}/include/arpa/nameser_compat.h \ + >${dest}/include/arpa/nameser_compat.h + # source files to prepend "include of local/port_before.h" while read f @@ -215,6 +223,10 @@ lib/libc/resolv/res_update.c lib/libc/string/strsep.c EOF +# This file includes a private "dprintf" which conflicts with stdio.h +sed -e 's/dprintf/DPRINTF/g' <${dest}/lib/libc/net/gethostbydns.c >XXX +mv XXX ${dest}/lib/libc/net/gethostbydns.c + # files to "include with freebsd" while read f -- cgit v1.2.3