Skip to content

Conversation

@xiaoxiang781216
Copy link
Contributor

remove $(Q) in ARCHIVE which is added back in commit fd3e2c5 accidentally

Signed-off-by: Xiang Xiao xiaoxiang@xiaomi.com

remove $(Q) in ARCHIVE which is added back in commit fd3e2c5 accidentally

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
@patacongo
Copy link
Contributor

I don't like the idea of removing these. It makes the build output really ugly. Allan did at least remove the echo's that were being echoed, but still the user experience is very much degraded.

@patacongo
Copy link
Contributor

I would at least like to understand why you doing this and if you have considered all possible alternatives

@yamt
Copy link
Contributor

yamt commented Feb 21, 2020

see apache/nuttx-apps#81 for an alternative

@xiaoxiang781216
Copy link
Contributor Author

I don't like the idea of removing these. It makes the build output really ugly. Allan did at least remove the echo's that were being echoed, but still the user experience is very much degraded.

But the output is almost same, here is the output before modification:
AR: clock_initialize.o clock_settime.o clock_gettime.o clock_getres.o clock_time2ticks.o clock_abstime2ticks.o clock_ticks2time.o clock_systimer.o clock_systimespec.o clock_timespec_add.o clock_timespec_subtract.o clock.o errno_getptr.o env_getenvironptr.o env_dup.o env_release.o env_findvar.o env_removevar.o env_clearenv.o env_getenv.o env_putenv.o env_setenv.o env_unsetenv.o env_foreach.o group_create.o group_join.o group_leave.o group_find.o group_setupstreams.o group_setupidlefiles.o group_setuptaskfiles.o group_foreachchild.o group_killchildren.o group_signal.o task_reparent.o group_childstatus.o group_suspendchildren.o group_continue.o group_exitinfo.o nx_start.o nx_bringup.o irq_initialize.o irq_attach.o irq_dispatch.o irq_unexpectedisr.o mq_send.o mq_timedsend.o mq_sndinternal.o mq_receive.o mq_timedreceive.o mq_rcvinternal.o mq_initialize.o mq_descreate.o mq_desclose.o mq_msgfree.o mq_msgqalloc.o mq_msgqfree.o mq_release.o mq_recover.o mq_setattr.o mq_waitirq.o mq_notify.o mq_getattr.o pg_miss.o pg_worker.o pthread_keycreate.o pthread_setspecific.o pthread_getspecific.o pthread_keydelete.o pthread_create.o pthread_exit.o pthread_join.o pthread_detach.o pthread_getschedparam.o pthread_setschedparam.o pthread_mutexinit.o pthread_mutexdestroy.o pthread_mutextimedlock.o pthread_mutextrylock.o pthread_mutexunlock.o pthread_condwait.o pthread_condsignal.o pthread_condbroadcast.o pthread_condtimedwait.o pthread_kill.o pthread_sigmask.o pthread_cancel.o pthread_initialize.o pthread_completejoin.o pthread_findjoininfo.o pthread_release.o pthread_setschedprio.o pthread_get_stackaddr_np.o pthread_get_stacksize_np.o pthread_mutex.o pthread_mutexconsistent.o pthread_mutexinconsistent.o pthread_cleanup.o sched_garbage.o sched_getfiles.o sched_addreadytorun.o sched_removereadytorun.o sched_addprioritized.o sched_mergeprioritized.o sched_mergepending.o sched_addblocked.o sched_removeblocked.o sched_free.o sched_gettcb.o sched_verifytcb.o sched_releasetcb.o sched_getsockets.o sched_getstreams.o sched_setparam.o sched_setpriority.o sched_getparam.o sched_setscheduler.o sched_getscheduler.o sched_yield.o sched_rrgetinterval.o sched_foreach.o sched_lock.o sched_unlock.o sched_lockcount.o sched_idletask.o sched_self.o sched_suspend.o sched_continue.o sched_waitpid.o sched_waitid.o sched_wait.o sched_timerexpiration.o sem_destroy.o sem_wait.o sem_trywait.o sem_tickwait.o sem_timedwait.o sem_timeout.o sem_post.o sem_recover.o sem_reset.o sem_waitirq.o sig_initialize.o sig_action.o sig_procmask.o sig_pending.o sig_suspend.o sig_kill.o sig_queue.o sig_waitinfo.o sig_timedwait.o sig_findaction.o sig_allocpendingsigaction.o sig_releasependingsigaction.o sig_unmaskpendingsignal.o sig_removependingsignal.o sig_releasependingsignal.o sig_lowest.o sig_notification.o sig_cleanup.o sig_dispatch.o sig_deliver.o sig_pause.o sig_nanosleep.o sig_usleep.o sig_sleep.o sig_ppoll.o sig_pselect.o sig_default.o task_create.o task_init.o task_setup.o task_activate.o task_start.o task_delete.o task_exit.o task_exithook.o task_getgroup.o task_getpid.o task_prctl.o task_recover.o task_restart.o task_spawnparms.o task_setcancelstate.o task_terminate.o exit.o task_spawn.o task_execv.o task_posixspawn.o task_onexit.o timer_initialize.o timer_create.o timer_delete.o timer_getoverrun.o timer_getitimer.o timer_gettime.o timer_setitimer.o timer_settime.o timer_release.o wd_initialize.o wd_create.o wd_start.o wd_cancel.o wd_delete.o wd_gettime.o wd_recover.o kwork_queue.o kwork_process.o kwork_cancel.o kwork_signal.o kwork_hpthread.o kwork_lpthread.o kwork_notifier.o

And the new output:
ar rcs libsched.a clock_initialize.o clock_settime.o clock_gettime.o clock_getres.o clock_time2ticks.o clock_abstime2ticks.o clock_ticks2time.o clock_systimer.o clock_systimespec.o clock_timespec_add.o clock_timespec_subtract.o clock.o errno_getptr.o env_getenvironptr.o env_dup.o env_release.o env_findvar.o env_removevar.o env_clearenv.o env_getenv.o env_putenv.o env_setenv.o env_unsetenv.o env_foreach.o group_create.o group_join.o group_leave.o group_find.o group_setupstreams.o group_setupidlefiles.o group_setuptaskfiles.o group_foreachchild.o group_killchildren.o group_signal.o task_reparent.o group_childstatus.o group_suspendchildren.o group_continue.o group_exitinfo.o nx_start.o nx_bringup.o irq_initialize.o irq_attach.o irq_dispatch.o irq_unexpectedisr.o mq_send.o mq_timedsend.o mq_sndinternal.o mq_receive.o mq_timedreceive.o mq_rcvinternal.o mq_initialize.o mq_descreate.o mq_desclose.o mq_msgfree.o mq_msgqalloc.o mq_msgqfree.o mq_release.o mq_recover.o mq_setattr.o mq_waitirq.o mq_notify.o mq_getattr.o pg_miss.o pg_worker.o pthread_keycreate.o pthread_setspecific.o pthread_getspecific.o pthread_keydelete.o pthread_create.o pthread_exit.o pthread_join.o pthread_detach.o pthread_getschedparam.o pthread_setschedparam.o pthread_mutexinit.o pthread_mutexdestroy.o pthread_mutextimedlock.o pthread_mutextrylock.o pthread_mutexunlock.o pthread_condwait.o pthread_condsignal.o pthread_condbroadcast.o pthread_condtimedwait.o pthread_kill.o pthread_sigmask.o pthread_cancel.o pthread_initialize.o pthread_completejoin.o pthread_findjoininfo.o pthread_release.o pthread_setschedprio.o pthread_get_stackaddr_np.o pthread_get_stacksize_np.o pthread_mutex.o pthread_mutexconsistent.o pthread_mutexinconsistent.o pthread_cleanup.o sched_garbage.o sched_getfiles.o sched_addreadytorun.o sched_removereadytorun.o sched_addprioritized.o sched_mergeprioritized.o sched_mergepending.o sched_addblocked.o sched_removeblocked.o sched_free.o sched_gettcb.o sched_verifytcb.o sched_releasetcb.o sched_getsockets.o sched_getstreams.o sched_setparam.o sched_setpriority.o sched_getparam.o sched_setscheduler.o sched_getscheduler.o sched_yield.o sched_rrgetinterval.o sched_foreach.o sched_lock.o sched_unlock.o sched_lockcount.o sched_idletask.o sched_self.o sched_suspend.o sched_continue.o sched_waitpid.o sched_waitid.o sched_wait.o sched_timerexpiration.o sem_destroy.o sem_wait.o sem_trywait.o sem_tickwait.o sem_timedwait.o sem_timeout.o sem_post.o sem_recover.o sem_reset.o sem_waitirq.o sig_initialize.o sig_action.o sig_procmask.o sig_pending.o sig_suspend.o sig_kill.o sig_queue.o sig_waitinfo.o sig_timedwait.o sig_findaction.o sig_allocpendingsigaction.o sig_releasependingsigaction.o sig_unmaskpendingsignal.o sig_removependingsignal.o sig_releasependingsignal.o sig_lowest.o sig_notification.o sig_cleanup.o sig_dispatch.o sig_deliver.o sig_pause.o sig_nanosleep.o sig_usleep.o sig_sleep.o sig_ppoll.o sig_pselect.o sig_default.o task_create.o task_init.o task_setup.o task_activate.o task_start.o task_delete.o task_exit.o task_exithook.o task_getgroup.o task_getpid.o task_prctl.o task_recover.o task_restart.o task_spawnparms.o task_setcancelstate.o task_terminate.o exit.o task_spawn.o task_execv.o task_posixspawn.o task_onexit.o timer_initialize.o timer_create.o timer_delete.o timer_getoverrun.o timer_getitimer.o timer_gettime.o timer_setitimer.o timer_settime.o timer_release.o wd_initialize.o wd_create.o wd_start.o wd_cancel.o wd_delete.o wd_gettime.o wd_recover.o kwork_queue.o kwork_process.o kwork_cancel.o kwork_signal.o kwork_hpthread.o kwork_lpthread.o kwork_notifier.o

The difference is: "AR :" v.s. "ar rcs libsched.a",

On the other hand, there isn't any ar output now by default if we add $(Q).

BTW, if we make with V=1, the old approach ouptut the almost same thing twice:
AR: clock_initialize.o clock_settime.o clock_gettime.o clock_getres.o clock_time2ticks.o clock_abstime2ticks.o clock_ticks2time.o clock_systimer.o clock_systimespec.o clock_timespec_add.o clock_timespec_subtract.o clock.o errno_getptr.o env_getenvironptr.o env_dup.o env_release.o env_findvar.o env_removevar.o env_clearenv.o env_getenv.o env_putenv.o env_setenv.o env_unsetenv.o env_foreach.o group_create.o group_join.o group_leave.o group_find.o group_setupstreams.o group_setupidlefiles.o group_setuptaskfiles.o group_foreachchild.o group_killchildren.o group_signal.o task_reparent.o group_childstatus.o group_suspendchildren.o group_continue.o group_exitinfo.o nx_start.o nx_bringup.o irq_initialize.o irq_attach.o irq_dispatch.o irq_unexpectedisr.o mq_send.o mq_timedsend.o mq_sndinternal.o mq_receive.o mq_timedreceive.o mq_rcvinternal.o mq_initialize.o mq_descreate.o mq_desclose.o mq_msgfree.o mq_msgqalloc.o mq_msgqfree.o mq_release.o mq_recover.o mq_setattr.o mq_waitirq.o mq_notify.o mq_getattr.o pg_miss.o pg_worker.o pthread_keycreate.o pthread_setspecific.o pthread_getspecific.o pthread_keydelete.o pthread_create.o pthread_exit.o pthread_join.o pthread_detach.o pthread_getschedparam.o pthread_setschedparam.o pthread_mutexinit.o pthread_mutexdestroy.o pthread_mutextimedlock.o pthread_mutextrylock.o pthread_mutexunlock.o pthread_condwait.o pthread_condsignal.o pthread_condbroadcast.o pthread_condtimedwait.o pthread_kill.o pthread_sigmask.o pthread_cancel.o pthread_initialize.o pthread_completejoin.o pthread_findjoininfo.o pthread_release.o pthread_setschedprio.o pthread_get_stackaddr_np.o pthread_get_stacksize_np.o pthread_mutex.o pthread_mutexconsistent.o pthread_mutexinconsistent.o pthread_cleanup.o sched_garbage.o sched_getfiles.o sched_addreadytorun.o sched_removereadytorun.o sched_addprioritized.o sched_mergeprioritized.o sched_mergepending.o sched_addblocked.o sched_removeblocked.o sched_free.o sched_gettcb.o sched_verifytcb.o sched_releasetcb.o sched_getsockets.o sched_getstreams.o sched_setparam.o sched_setpriority.o sched_getparam.o sched_setscheduler.o sched_getscheduler.o sched_yield.o sched_rrgetinterval.o sched_foreach.o sched_lock.o sched_unlock.o sched_lockcount.o sched_idletask.o sched_self.o sched_suspend.o sched_continue.o sched_waitpid.o sched_waitid.o sched_wait.o sched_timerexpiration.o sem_destroy.o sem_wait.o sem_trywait.o sem_tickwait.o sem_timedwait.o sem_timeout.o sem_post.o sem_recover.o sem_reset.o sem_waitirq.o sig_initialize.o sig_action.o sig_procmask.o sig_pending.o sig_suspend.o sig_kill.o sig_queue.o sig_waitinfo.o sig_timedwait.o sig_findaction.o sig_allocpendingsigaction.o sig_releasependingsigaction.o sig_unmaskpendingsignal.o sig_removependingsignal.o sig_releasependingsignal.o sig_lowest.o sig_notification.o sig_cleanup.o sig_dispatch.o sig_deliver.o sig_pause.o sig_nanosleep.o sig_usleep.o sig_sleep.o sig_ppoll.o sig_pselect.o sig_default.o task_create.o task_init.o task_setup.o task_activate.o task_start.o task_delete.o task_exit.o task_exithook.o task_getgroup.o task_getpid.o task_prctl.o task_recover.o task_restart.o task_spawnparms.o task_setcancelstate.o task_terminate.o exit.o task_spawn.o task_execv.o task_posixspawn.o task_onexit.o timer_initialize.o timer_create.o timer_delete.o timer_getoverrun.o timer_getitimer.o timer_gettime.o timer_setitimer.o timer_settime.o timer_release.o wd_initialize.o wd_create.o wd_start.o wd_cancel.o wd_delete.o wd_gettime.o wd_recover.o kwork_queue.o kwork_process.o kwork_cancel.o kwork_signal.o kwork_hpthread.o kwork_lpthread.o kwork_notifier.o
flock libsched.a.lock ar rcs libsched.a clock_initialize.o clock_settime.o clock_gettime.o clock_getres.o clock_time2ticks.o clock_abstime2ticks.o clock_ticks2time.o clock_systimer.o clock_systimespec.o clock_timespec_add.o clock_timespec_subtract.o clock.o errno_getptr.o env_getenvironptr.o env_dup.o env_release.o env_findvar.o env_removevar.o env_clearenv.o env_getenv.o env_putenv.o env_setenv.o env_unsetenv.o env_foreach.o group_create.o group_join.o group_leave.o group_find.o group_setupstreams.o group_setupidlefiles.o group_setuptaskfiles.o group_foreachchild.o group_killchildren.o group_signal.o task_reparent.o group_childstatus.o group_suspendchildren.o group_continue.o group_exitinfo.o nx_start.o nx_bringup.o irq_initialize.o irq_attach.o irq_dispatch.o irq_unexpectedisr.o mq_send.o mq_timedsend.o mq_sndinternal.o mq_receive.o mq_timedreceive.o mq_rcvinternal.o mq_initialize.o mq_descreate.o mq_desclose.o mq_msgfree.o mq_msgqalloc.o mq_msgqfree.o mq_release.o mq_recover.o mq_setattr.o mq_waitirq.o mq_notify.o mq_getattr.o pg_miss.o pg_worker.o pthread_keycreate.o pthread_setspecific.o pthread_getspecific.o pthread_keydelete.o pthread_create.o pthread_exit.o pthread_join.o pthread_detach.o pthread_getschedparam.o pthread_setschedparam.o pthread_mutexinit.o pthread_mutexdestroy.o pthread_mutextimedlock.o pthread_mutextrylock.o pthread_mutexunlock.o pthread_condwait.o pthread_condsignal.o pthread_condbroadcast.o pthread_condtimedwait.o pthread_kill.o pthread_sigmask.o pthread_cancel.o pthread_initialize.o pthread_completejoin.o pthread_findjoininfo.o pthread_release.o pthread_setschedprio.o pthread_get_stackaddr_np.o pthread_get_stacksize_np.o pthread_mutex.o pthread_mutexconsistent.o pthread_mutexinconsistent.o pthread_cleanup.o sched_garbage.o sched_getfiles.o sched_addreadytorun.o sched_removereadytorun.o sched_addprioritized.o sched_mergeprioritized.o sched_mergepending.o sched_addblocked.o sched_removeblocked.o sched_free.o sched_gettcb.o sched_verifytcb.o sched_releasetcb.o sched_getsockets.o sched_getstreams.o sched_setparam.o sched_setpriority.o sched_getparam.o sched_setscheduler.o sched_getscheduler.o sched_yield.o sched_rrgetinterval.o sched_foreach.o sched_lock.o sched_unlock.o sched_lockcount.o sched_idletask.o sched_self.o sched_suspend.o sched_continue.o sched_waitpid.o sched_waitid.o sched_wait.o sched_timerexpiration.o sem_destroy.o sem_wait.o sem_trywait.o sem_tickwait.o sem_timedwait.o sem_timeout.o sem_post.o sem_recover.o sem_reset.o sem_waitirq.o sig_initialize.o sig_action.o sig_procmask.o sig_pending.o sig_suspend.o sig_kill.o sig_queue.o sig_waitinfo.o sig_timedwait.o sig_findaction.o sig_allocpendingsigaction.o sig_releasependingsigaction.o sig_unmaskpendingsignal.o sig_removependingsignal.o sig_releasependingsignal.o sig_lowest.o sig_notification.o sig_cleanup.o sig_dispatch.o sig_deliver.o sig_pause.o sig_nanosleep.o sig_usleep.o sig_sleep.o sig_ppoll.o sig_pselect.o sig_default.o task_create.o task_init.o task_setup.o task_activate.o task_start.o task_delete.o task_exit.o task_exithook.o task_getgroup.o task_getpid.o task_prctl.o task_recover.o task_restart.o task_spawnparms.o task_setcancelstate.o task_terminate.o exit.o task_spawn.o task_execv.o task_posixspawn.o task_onexit.o timer_initialize.o timer_create.o timer_delete.o timer_getoverrun.o timer_getitimer.o timer_gettime.o timer_setitimer.o timer_settime.o timer_release.o wd_initialize.o wd_create.o wd_start.o wd_cancel.o wd_delete.o wd_gettime.o wd_recover.o kwork_queue.o kwork_process.o kwork_cancel.o kwork_signal.o kwork_hpthread.o kwork_lpthread.o kwork_notifier.o

@patacongo
Copy link
Contributor

But that is not the case for archivers that archive one file at a time in a Bash loop

@patacongo
Copy link
Contributor

Why do you need this change? It looks like a bad changes, just doing things the easy way to avoid the right solution.

@xiaoxiang781216
Copy link
Contributor Author

I would at least like to understand why you doing this and if you have considered all possible alternatives

Here is reason, to avoid the multiple thread write libapps.a, we need add flock around ARCHIVE like this:
define ARLOCK
$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
endef
@ symbol is normally parsed and removed by make before send to bash, but this just happen if @ is the first char, so @ symbol escape to bash in ARLOCK case(@ is in the middle of command),

@xiaoxiang781216
Copy link
Contributor Author

But that is not the case for archivers that archive one file at a time in a Bash loop

Yes, z80 series will be a problem, since I don't work with z80 and can't understand why z80 ar so different to other toolchain.

@patacongo
Copy link
Contributor

z80/z16 need the for loop because the archiver can add only one file to the archive at a tim.e

Does PR81 change anything? Does this still need to be merged.

@patacongo patacongo changed the base branch from master to pr342 February 21, 2020 13:31
@patacongo patacongo merged commit 20449bf into apache:pr342 Feb 21, 2020
@xiaoxiang781216 xiaoxiang781216 deleted the flock-libapps branch February 21, 2020 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants