[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT NGINX 2/5] Add Makefile.uk



Hi Mihai,

Please see inline.

On 10/9/19 1:42 AM, Mihai Pogonaru wrote:
> Signed-off-by: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
> ---
>  Makefile.uk | 214 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 214 insertions(+)
>  create mode 100644 Makefile.uk
> 
> diff --git a/Makefile.uk b/Makefile.uk
> new file mode 100644
> index 0000000..983343b
> --- /dev/null
> +++ b/Makefile.uk
> @@ -0,0 +1,214 @@
> +#  SPDX-License-Identifier: BSD-3-Clause
> +#
> +#  Nginx Makefile.uk
> +#
> +#  Authors: Mihai Pogonaru <pogonarumihai@xxxxxxxxx>
> +#           Costin Lupu <costin.lupu@xxxxxxxxx>

I don't remember adding any line in this Makefile, so you can remove me
from the authors.

> +#
> +#  Copyright (c) 2019, University Politehnica of Bucharest. All rights 
> reserved.
> +#
> +#  Redistribution and use in source and binary forms, with or without
> +#  modification, are permitted provided that the following conditions
> +#  are met:
> +#
> +#  1. Redistributions of source code must retain the above copyright
> +#     notice, this list of conditions and the following disclaimer.
> +#  2. Redistributions in binary form must reproduce the above copyright
> +#     notice, this list of conditions and the following disclaimer in the
> +#     documentation and/or other materials provided with the distribution.
> +#  3. Neither the name of the copyright holder nor the names of its
> +#     contributors may be used to endorse or promote products derived from
> +#     this software without specific prior written permission.
> +#
> +#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 
> IS"
> +#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> +#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> +#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> +#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> +#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> +#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> +#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> +#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> +#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> +#  POSSIBILITY OF SUCH DAMAGE.
> +#
> +#  THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
> +#
> +
> +################################################################################
> +# Library registration
> +################################################################################
> +$(eval $(call addlib_s,libnginx,$(CONFIG_LIBNGINX)))
> +
> +LIBNGINX_VERSION = 1.15.6
> +LIBNGINX_URL = http://nginx.org/download/nginx-$(LIBNGINX_VERSION).tar.gz
> +LIBNGINX_PATCHDIR = $(LIBNGINX_BASE)/patches
> +
> +$(eval $(call fetch,libnginx,$(LIBNGINX_URL)))
> +$(eval $(call patch,libnginx,$(LIBNGINX_PATCHDIR),nginx-$(LIBNGINX_VERSION)))
> +
> +################################################################################
> +# Sources
> +################################################################################
> +
> +LIBNGINX_SRCS-y += $(LIBNGINX_BASE)/stubs.c
> +
> +################################################################################
> +# Helpers
> +################################################################################
> +LIBNGINX_SUBDIR = nginx-$(LIBNGINX_VERSION)
> +LIBNGINX_SRC = $(LIBNGINX_ORIGIN)/$(LIBNGINX_SUBDIR)/src
> +
> +################################################################################
> +# Library includes
> +################################################################################
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_BASE)/include
> +
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/core
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/event
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/event/modules
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/http
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/http/modules
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/http/modules/perl
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/http/v2
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/mail
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/os/unix
> +CINCLUDES-$(CONFIG_LIBNGINX) += -I$(LIBNGINX_SRC)/stream

Do we really need to export these include paths for all the other
Unikraft libraries? Or is it just for nginx? If the latter, then we
should namespace the includes (e.g.
's/CINCLUDES-$(CONFIG_...)/LIBNGINX_CINCLUDES-$(CONFIG_...)').

> +
> +################################################################################
> +# Global flags
> +################################################################################
> +# Suppress some warnings to make the build process look neater
> +FLAGS = -W -Wall -Wpointer-arith -Werror

Same here: 's/FLAGS/LIBNGINX_FLAGS' or 's/FLAGS/LIBNGINX_COMMON_FLAGS'.

> +
> +FLAGS_SUPPRESS = -Wno-unused-parameter -Wno-unused-variable -Wno-nonnull     
>     \
> +-Wno-unused-but-set-variable -Wno-unused-label -Wno-char-subscripts          
>     \
> +-Wno-unused-function -Wno-missing-field-initializers -Wno-uninitialized      
>             \
> +-Wno-array-bounds -Wno-maybe-uninitialized -Wno-pointer-sign 
> -Wno-unused-value           \
> +-Wno-unused-macros -Wno-parentheses -Wno-implicit-function-declaration       
>             \
> +-Wno-missing-braces -Wno-endif-labels -Wno-implicit-function-declaration     
>     \
> +-Wno-type-limits -Wno-sign-compare

Do we really need to suppress so many warnings? We do use in pcre port
the minimum suppression flags, as an example.

And the same here, 's/FLAGS_SUPPRESS/LIBNGINX_SUPPRESS_FLAGS'.

> +
> +LIBNGINX_CFLAGS-y +=  $(FLAGS)
> +LIBNGINX_CFLAGS-y +=  $(FLAGS_SUPPRESS)
> +
> +################################################################################
> +# Library sources
> +################################################################################
> +LIBNGINX_SRCS-y += $(LIBNGINX_BASE)/ngx_modules.c
> +
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/nginx.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_array.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_buf.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_conf_file.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_connection.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_cpuinfo.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_crc32.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_crypt.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_cycle.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_file.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_hash.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_inet.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_list.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_log.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_md5.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_murmurhash.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_open_file_cache.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_output_chain.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_palloc.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_parse.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_parse_time.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_proxy_protocol.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_queue.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_radix_tree.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_rbtree.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_resolver.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_rwlock.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_sha1.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_shmtx.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_slab.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_spinlock.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_string.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_syslog.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/core/ngx_times.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/event/modules/ngx_select_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/event/ngx_event_accept.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/event/ngx_event.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/event/ngx_event_connect.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/event/ngx_event_pipe.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/event/ngx_event_posted.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/event/ngx_event_timer.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/event/ngx_event_udp.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_access_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_autoindex_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_browser_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_charset_filter_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_chunked_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_empty_gif_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_fastcgi_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_geo_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_headers_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_index_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_limit_conn_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_limit_req_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_log_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_map_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_memcached_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_mirror_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_not_modified_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_proxy_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_range_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_referer_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_scgi_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_split_clients_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_ssi_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_static_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_sub_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_try_files_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_upstream_hash_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_upstream_ip_hash_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_upstream_keepalive_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_upstream_least_conn_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_upstream_random_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_upstream_zone_module.c
> +LIBNGINX_SRCS-y += 
> $(LIBNGINX_SRC)/http/modules/ngx_http_userid_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/modules/ngx_http_uwsgi_module.c

I think it's safe to move all the modules (as a group of sources) at the
end, after all the other groups of sources (core, event, http, os).

> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_copy_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_core_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_header_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_parse.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_postpone_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_request_body.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_request.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_script.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_special_response.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_upstream.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_upstream_round_robin.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_variables.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/http/ngx_http_write_filter_module.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_alloc.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_channel.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_daemon.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_dlopen.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_errno.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_files.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_linux_init.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_linux_sendfile_chain.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_posix_init.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_process.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_process_cycle.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_readv_chain.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_recv.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_send.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_setaffinity.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_setproctitle.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_shmem.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_socket.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_time.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_udp_recv.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_udp_send.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_udp_sendmsg_chain.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_user.c
> +LIBNGINX_SRCS-y += $(LIBNGINX_SRC)/os/unix/ngx_writev_chain.c
> 

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.